- Fixed the Filters plugin to allow commas in filter criteria text
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 May 2009 01:51:16 +0000 (01:51 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 19 May 2009 01:51:16 +0000 (01:51 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@13721 7612ce4b-ef26-0410-bec9-ea0150e637f0

doc/ChangeLog
plugins/filters/filters.php
plugins/filters/options.php

index 9e7eb79..71d76df 100644 (file)
@@ -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)
 --------------------------------------
index 3ceb60b..568abfe 100644 (file)
@@ -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;
index b884c84..39b47be 100644 (file)
@@ -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('"', '&quot;', $filter_what);