From: pdontthink Date: Tue, 19 May 2009 01:51:16 +0000 (+0000) Subject: - Fixed the Filters plugin to allow commas in filter criteria text X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=eceb3fe56e7ef548f83797639e9d6d993254695b;p=squirrelmail.git - Fixed the Filters plugin to allow commas in filter criteria text git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13721 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/doc/ChangeLog b/doc/ChangeLog index 9e7eb797..71d76df8 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -313,6 +313,7 @@ Version 1.5.2 - SVN - Cleanup variable name in address search for compose to clearup confusion. - Remove Javascript from address search page when JavaScript is disabled. - Add "Check All" function to address book when using "in-page" addressbook. + - Fixed the Filters plugin to allow commas in filter criteria text Version 1.5.1 (branched on 2006-02-12) -------------------------------------- diff --git a/plugins/filters/filters.php b/plugins/filters/filters.php index 3ceb60bd..568abfee 100644 --- a/plugins/filters/filters.php +++ b/plugins/filters/filters.php @@ -592,7 +592,7 @@ function load_filters() { 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; diff --git a/plugins/filters/options.php b/plugins/filters/options.php index b884c84a..39b47bee 100644 --- a/plugins/filters/options.php +++ b/plugins/filters/options.php @@ -52,7 +52,7 @@ if (sqgetGlobalVar('filter_submit',$filter_submit,SQ_POST)) { } 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);