Fix #6628 - searching on notification history
[Pman.Core] / DataObjects / Core_notify.php
index 6cc632a..e90f61e 100644 (file)
@@ -237,6 +237,11 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
     
     function applyFilters($q, $au, $roo)
     {
+        
+        if (!empty($q['search']['contains'])) {
+            $this->whereAdd("join_event_id_id.remarks LIKE '%".$this->escape($q['search']['contains']) ."%'");
+            
+        }
         if (isset($q['ontable']) && !in_array($q['ontable'], array('Person', 'Events',  'core_watch'))) {
             // this will only work on tables not joined to ours.
             
@@ -329,7 +334,7 @@ class Pman_Core_DataObjects_Core_notify extends DB_DataObject
         }
         
         try {
-            $send->get($this->id, array());
+            $send->get($this->id, array('force' => 1));
         } catch (Exception $e) {
             ob_end_clean();
             return $e;