From: Alexandros V. <av...@no...> - 2007-08-27 09:29:08
|
On Mon, 27 Aug 2007 11:51:09 +0300 (EEST) "Boyan B. Boychev" <bbo...@bo...> wrote: > Today I installed "Junk Folder" plugin > (http://www.squirrelmail.org/plugin_view.php?id=3D212) to test it. > There is a small problem with it. When I opened my Junk folder I > didn't see the picture but this: > -------------------------------------------------------------------------= ----- > <img src=3D"../plugins/junkfolder/images/warning.png" alt=3D"Warning" > title=3D"Warning" align=3D"center" /><br /> Notice: This is your Junk > Folder. Messages older than 6 days will be automatically removed from > this folder. > -------------------------------------------------------------------------= ----- I am aware of this. Unfortunately, Squirrelmail is now sanitizing the global variable that this plugin touches. You can fix this by applying the following patch for src/right_main.php. --- right_main.php (revision 12339) +++ right_main.php (working copy) @@ -144,6 +144,11 @@ $thread_sort_messages =3D 0; } =20 +if (isset($note)) { + $note =3D htmlspecialchars($note); +} +do_hook ('generic_header'); + sqimap_mailbox_select($imapConnection, $mailbox); =20 if ($composenew) { @@ -156,7 +161,7 @@ =20 do_hook('right_main_after_header'); if (isset($note)) { - echo html_tag( 'div', '<b>' . htmlspecialchars($note) .'</b>', 'center' ) . "<br />\n"; + echo html_tag( 'div', '<b>' . $note .'</b>', 'center' ) . "<br />\n"; } Devs -- I had sent this before in devel list. Perhaps we can consider something like this for -stable? > And one more thing. I filterred my spam to go in Junk folder. > Configured my sieve script, but now could I place some nice picture > in the left panel of SquirrelMail in front of Junk folder like > "Message Flags & Icons" do with INBOX, Drafts and Sent folders. Maybe > in the next release of the plugin could have an option to place an > image for Junk folder if it exists ;-). I think this is not possible inside a plugin. Again, you would need a patch for left_main.php to display a different icon. It's not that difficult though, I think you can figure out by yourself how to add a new 'elseif' block in src/left_main.php. ;-) --=20 Alexandros Vellis National and Kapodistrian University of Athens Network Operations Centre |