]> git.andy128k.dev Git - ipf.git/commitdiff
admin fix filter queries
authorAndrey Kutejko <andy128k@gmail.com>
Fri, 16 Aug 2013 04:57:25 +0000 (07:57 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Fri, 16 Aug 2013 04:57:25 +0000 (07:57 +0300)
ipf/admin/model.php

index 62a0a6c0835a69e2499ed7f961f0f5b876c0b594..a3318f1a0de78d140f6d3e9d0b2718e26a17b2df 100644 (file)
@@ -42,7 +42,7 @@ class ListFilter extends BaseListFilter {
         if (isset($request->GET[$param_name])){
             $id = $request->GET[$param_name];
             if ($this->IsChoice($id)){
-                $q->where($this->local.'='.$id);
+                $q->addWhere($this->local.'='.$id);
             }
         }
     }
@@ -146,7 +146,7 @@ class ListTreeFilter extends BaseListFilter{
                         $dql .= ' AND ';
                     $dql .= $w;
                 }
-                $q->where($dql);
+                $q->addWhere($dql);
             }
         }
     }
@@ -796,7 +796,7 @@ class IPF_Admin_Model
                 $wh.= $f.' like ?';
                 $whv[] = '%'.$this->search_value.'%';
             }
-            $this->q->where($wh,$whv);
+            $this->q->addWhere($wh,$whv);
             return true;
         }
         return false;