[imp] IMAP Deleted Messages
Ed
engineer@mca.k12.pa.us
Wed, 24 Jul 2002 18:40:32 -0400
The following patch fixes:
1. If the delhide pref is locked, user does not see the Show Deleted/Hide
Deleted link.
2. If Deleted Messages are hidden, then user does not see the Undelete link.
Index: imp/mailbox.php
===================================================================
RCS file: /repository/imp/mailbox.php,v
retrieving revision 2.404
diff -b -u -2 -r2.404 mailbox.php
--- imp/mailbox.php 23 Jul 2002 17:43:25 -0000 2.404
+++ imp/mailbox.php 24 Jul 2002 22:32:11 -0000
@@ -328,7 +328,7 @@
}
-if ($prefs->getValue('delhide')) {
+if (($prefs->getValue('delhide')) && (!$prefs->isLocked('delhide'))) {
$deleted_prompt = _("Show Deleted");
-} else {
+} elseif (!$prefs->isLocked('delhide')) {
$deleted_prompt = _("Hide Deleted");
}
Index: imp/templates/mailbox/actions.inc
===================================================================
RCS file: /repository/imp/templates/mailbox/actions.inc,v
retrieving revision 2.44
diff -b -u -2 -r2.44 actions.inc
--- imp/templates/mailbox/actions.inc 20 Jul 2002 17:21:50 -0000 2.44
+++ imp/templates/mailbox/actions.inc 24 Jul 2002 22:32:37 -0000
@@ -15,5 +15,5 @@
onmouseout="status='';"><?php echo _("Delete") ?></a>
<?php endif; ?>
- <?php if (!$prefs->getValue('use_trash') && strstr($imp['protocol'],
'imap')): ?> |
+ <?php if (!$prefs->getValue('use_trash') && strstr($imp['protocol'],
'imap') && !$prefs->getValue('delhide')): ?> |
<a class="widget" href="" onclick="Submit(<?php echo
UNDELETE_MESSAGES ?>); return false;"
onmouseover="status='<?php echo addslashes(_("Undelete")) ?>';
return true;"
@@ -27,7 +27,9 @@
<?php if ($showdelete): ?>
<?php $mailbox_link = Horde::addParameter($mailbox_url, 'page=' .
$page); ?>
+ <?php if (!$prefs->isLocked('delhide')): ?>
<a class="widget" href="<?php echo
Horde::addParameter($mailbox_link, 'actionID=' . HIDE_DELETED) ?>"
onmouseover="status='<?php echo addslashes($deleted_prompt) ?>';
return true;"
onmouseout="status='';"><?php echo $deleted_prompt ?></a> |
+ <?php endif; ?>
<a class="widget" href="<?php echo
Horde::addParameter($mailbox_link, 'actionID=' . EXPUNGE_MAILBOX) ?>"
onmouseover="status='<?php echo addslashes(_("Purge Deleted"))
?>'; return true;"