Allow plugins to add non-link text for attachments
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 12 Apr 2021 04:28:53 +0000 (04:28 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Mon, 12 Apr 2021 04:28:53 +0000 (04:28 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14913 7612ce4b-ef26-0410-bec9-ea0150e637f0

templates/default/read_attachments.tpl

index 65fb4e6d774dee87c0613bd77b4b8ec76ae5d758..3cb0652004741d15f89a62018380b71d83d2254b 100644 (file)
@@ -81,10 +81,11 @@ if (count($attachments)==0) {
     }
 
     foreach ($attachment['OtherLinks'] as $link) {
-        ?>
-   &nbsp;|&nbsp;
-   <a href="<?php echo $link['HREF'] . '" ' . $link['Extra']; ?>><?php echo $link['Text']; ?></a>
-        <?php
+        echo '&nbsp;|&nbsp;';
+        if (empty($link['HREF']))
+            echo '<span ' . $link['Extra'] . '>' . $link['Text'] . '</span>';
+        else
+            echo '<a href="' . $link['HREF'] . '" ' . $link['Extra'] . '>' . $link['Text'] . '</a>';
     }
    ?>
    </small>