From: <pdo...@us...> - 2009-05-19 02:02:54
|
Revision: 13720 http://squirrelmail.svn.sourceforge.net/squirrelmail/?rev=13720&view=rev Author: pdontthink Date: 2009-05-19 01:49:24 +0000 (Tue, 19 May 2009) Log Message: ----------- - Fixed the Filters plugin to allow commas in filter criteria text Modified Paths: -------------- branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog branches/SM-1_4-STABLE/squirrelmail/plugins/filters/filters.php branches/SM-1_4-STABLE/squirrelmail/plugins/filters/options.php Modified: branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2009-05-18 12:02:52 UTC (rev 13719) +++ branches/SM-1_4-STABLE/squirrelmail/doc/ChangeLog 2009-05-19 01:49:24 UTC (rev 13720) @@ -6,6 +6,7 @@ -------------------- - Removed use of session_unregister() for compatibility with PHP 5.3.0 and PHP 6 + - Fixed the Filters plugin to allow commas in filter criteria text Version 1.4.18 - 11 May 2009 ---------------------------- Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/filters/filters.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/plugins/filters/filters.php 2009-05-18 12:02:52 UTC (rev 13719) +++ branches/SM-1_4-STABLE/squirrelmail/plugins/filters/filters.php 2009-05-19 01:49:24 UTC (rev 13720) @@ -528,7 +528,7 @@ for ($i=0; $fltr = getPref($data_dir, $username, 'filter' . $i); $i++) { $ary = explode(',', $fltr); $filters[$i]['where'] = $ary[0]; - $filters[$i]['what'] = $ary[1]; + $filters[$i]['what'] = str_replace('###COMMA###', ',', $ary[1]); $filters[$i]['folder'] = $ary[2]; } return $filters; Modified: branches/SM-1_4-STABLE/squirrelmail/plugins/filters/options.php =================================================================== --- branches/SM-1_4-STABLE/squirrelmail/plugins/filters/options.php 2009-05-18 12:02:52 UTC (rev 13719) +++ branches/SM-1_4-STABLE/squirrelmail/plugins/filters/options.php 2009-05-19 01:49:24 UTC (rev 13720) @@ -79,7 +79,7 @@ } if ($complete_post) { - $filter_what = str_replace(',', ' ', $filter_what); + $filter_what = str_replace(',', '###COMMA###', $filter_what); $filter_what = str_replace("\\\\", "\\", $filter_what); $filter_what = str_replace("\\\"", '"', $filter_what); $filter_what = str_replace('"', '"', $filter_what); @@ -276,4 +276,4 @@ ) , 'center', '', 'width="80%" border="0" cellpadding="2" cellspacing="0"' ); echo '</body></html>'; -?> \ No newline at end of file +?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |