[Tickets #1096] NEW: Show "Report as __" links everywhere -- config option

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Jan 6 13:43:03 PST 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1096
-----------------------------------------------------------------------
 Ticket     | 1096
 Created By | dustin at ywlcs.org
 Summary    | Show "Report as __" links everywhere -- config option
 Queue      | IMP
 Version    | 4.0.1
 State      | New
 Priority   | 1. Low
 Type       | Enhancement
 Owners     | 
-----------------------------------------------------------------------


dustin at ywlcs.org (2005-01-06 13:43) wrote:

I changed the IMP config a little bit to support configuring where the
"Report as" spam/innocent links appear; in our setup, users do not have a
separate spam folder (we just annotate the Subject header), so the defaults
didn't make sense.

Here's a patch:

*** templates/message/navbar_actions.inc.original	2005-01-04
16:46:06.000000000 -0600
--- templates/message/navbar_actions.inc	2005-01-06 15:19:54.000000000
-0600
***************
*** 30,37 ****
   | <?php echo Horde::widget($save_link, _("Save as"), 'widget', '', '',
_("Sa_ve as"), 2) ?>
   | <?php echo Horde::widget('', _("Print"), 'widget', '',
"open_print_win('" . $print_link . "'); return false;", _("_Print"), true)
?>
! <?php if (isset($spam_link) && $imp['mailbox'] !=
IMP::addPreambleString($prefs->getValue('spam_folder'))): ?>
   | <?php echo Horde::widget($spam_link, _("Report as Spam"), 'widget', '',
'', _("Report as Spam"), true) ?>
  <?php endif; ?>
! <?php if (isset($notspam_link) &&  $imp['mailbox'] ==
IMP::addPreambleString($prefs->getValue('spam_folder'))): ?>
   | <?php echo Horde::widget($notspam_link, _("Report as Innocent"),
'widget', '', '', _("Report as Innocent"), true) ?>
  <?php endif; ?>
--- 30,37 ----
   | <?php echo Horde::widget($save_link, _("Save as"), 'widget', '', '',
_("Sa_ve as"), 2) ?>
   | <?php echo Horde::widget('', _("Print"), 'widget', '',
"open_print_win('" . $print_link . "'); return false;", _("_Print"), true)
?>
! <?php if (isset($spam_link) && ($conf['spam']['spamfolder'] ||
$imp['mailbox'] !=
IMP::addPreambleString($prefs->getValue('spam_folder')))): ?>
   | <?php echo Horde::widget($spam_link, _("Report as Spam"), 'widget', '',
'', _("Report as Spam"), true) ?>
  <?php endif; ?>
! <?php if (isset($notspam_link) && ($conf['notspam']['spamfolder'] ||
$imp['mailbox'] ==
IMP::addPreambleString($prefs->getValue('spam_folder')))): ?>
   | <?php echo Horde::widget($notspam_link, _("Report as Innocent"),
'widget', '', '', _("Report as Innocent"), true) ?>
  <?php endif; ?>
*** templates/mailbox/actions.inc.orig	2005-01-04 16:48:45.000000000 -0600
--- templates/mailbox/actions.inc	2005-01-06 15:38:06.000000000 -0600
***************
*** 20,29 ****
  <?php endif; ?>
      | <?php echo Horde::widget('', _("Forward"), 'widget', '',
"Submit('fwd_digest'); return false;", _("Fo_rward")) ?>
! <?php if ($conf['spam']['reporting']): ?>
! <?php if ($imp['mailbox'] !=
IMP::addPreambleString($prefs->getValue('spam_folder'))): ?>
      | <?php echo Horde::widget('', _("Report as Spam"), 'widget', '',
"Submit('spam_report'); return false;", _("Report as Spam")); ?>
- <?php else: ?>
-     | <?php echo Horde::widget('', _("Report as Innocent"), 'widget', '',
"Submit('notspam_report'); return false;", _("Report as Innocent")); ?>
  <?php endif; ?>
  <?php endif; ?>
      </td>
--- 20,28 ----
  <?php endif; ?>
      | <?php echo Horde::widget('', _("Forward"), 'widget', '',
"Submit('fwd_digest'); return false;", _("Fo_rward")) ?>
! <?php if ($conf['spam']['reporting'] && ($conf['spam']['spamfolder'] ||
$imp['mailbox'] !=
IMP::addPreambleString($prefs->getValue('spam_folder')))): ?>
      | <?php echo Horde::widget('', _("Report as Spam"), 'widget', '',
"Submit('spam_report'); return false;", _("Report as Spam")); ?>
  <?php endif; ?>
+ <?php if ($conf['notspam']['reporting'] &&
(!$conf['notspam']['spamfolder'] || $imp['mailbox'] ==
IMP::addPreambleString($prefs->getValue('spam_folder')))): ?>
+     | <?php echo Horde::widget('', _("Report as Innocent"), 'widget', '',
"Submit('notspam_report'); return false;", _("Report as Innocent")); ?>
  <?php endif; ?>
      </td>
*** config/conf.xml.original	2005-01-06 15:38:43.000000000 -0600
--- config/conf.xml	2005-01-06 15:19:06.000000000 -0600
***************
*** 159,164 ****
     <configheader>Spam Reporting</configheader>
     <configboolean name="reporting" desc="Should we display a 'report this
!    message as spam' link in the message view?">false</configboolean>
!    <configstring name="email" required="false" desc="If so, should we
report
     them via email? The messages will be sent to this address in a single
     multipart/digest message (useful for reporting to an admin user, for
--- 159,166 ----
     <configheader>Spam Reporting</configheader>
     <configboolean name="reporting" desc="Should we display a 'report this
!    message as spam' link?">false</configboolean>
!    <configboolean name="spamfolder" desc="If so, should the link also
appear
!    in the user's spam folder?">false</configboolean>
!    <configstring name="email" required="false" desc="Should we report
     them via email? The messages will be sent to this address in a single
     multipart/digest message (useful for reporting to an admin user, for
***************
*** 174,179 ****
    <configsection name="notspam">
     <configboolean name="reporting" desc="Should we display a 'report this
!    message as innocent' link in the message view?">false</configboolean>
!    <configstring name="email" required="false" desc="If so, should we
report
     them via email? The messages will be sent to this address in a single
     multipart/digest message (useful for reporting to an admin user, for
--- 176,183 ----
    <configsection name="notspam">
     <configboolean name="reporting" desc="Should we display a 'report this
!    message as innocent' link?">false</configboolean>
!    <configboolean name="spamfolder" desc="If so, should the link only
appear
!    in the user's spam folder?">true</configboolean>
!    <configstring name="email" required="false" desc="Should we report
     them via email? The messages will be sent to this address in a single
     multipart/digest message (useful for reporting to an admin user, for





More information about the bugs mailing list