فهرست منبع

- Fixed the Filters plugin to allow commas in filter criteria text

pdontthink 16 سال پیش
والد
کامیت
64d68af4df
3فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 1 0
      doc/ChangeLog
  2. 1 1
      plugins/filters/filters.php
  3. 1 1
      plugins/filters/options.php

+ 1 - 0
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)
 --------------------------------------

+ 1 - 1
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;

+ 1 - 1
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);