DataObjects/Images.php
authorbenny <benny@roojs.com>
Fri, 20 Jul 2018 09:28:15 +0000 (17:28 +0800)
committerbenny <benny@roojs.com>
Fri, 20 Jul 2018 09:28:15 +0000 (17:28 +0800)
DataObjects/Images.php

index 15a9101..9b5f666 100644 (file)
@@ -29,6 +29,20 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
     
     /* the code above is auto generated do not remove the tag below */
     ###END_AUTOCODE
+    function applyFilters($q, $au, $roo)
+    {
+        $tn = $this->tableName();
+        
+        if(!empty($q['search']['filename'])){
+            $this->whereAdd("
+                $tn.name LIKE '%{$this->escape($q['search']['filename'])}%'
+                OR
+                $tn.subject LIKE '%{$this->escape($q['search']['filename'])}%'
+            ");
+        }
+
+    }
     
     function checkPerm($lvl, $au)
     {