- 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 9e7eb7978bbbd34ec463fd1fb2b18e1fa598583c..71d76df810202cf4c8b75ac436ae006fc2868e6e 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 3ceb60bd638fd44937fbbd05bce5f69516a2fc8a..568abfee564084ea8580bee1435f563b3d5cd961 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 b884c84a6115b88614cc39e7f3fbbc6fe6fd7067..39b47beec40b9b234a0b4f15081b660584e40a41 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);