aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Controllers/GenericController.php
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Controllers/GenericController.php')
-rw-r--r--h-source/Application/Controllers/GenericController.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/h-source/Application/Controllers/GenericController.php b/h-source/Application/Controllers/GenericController.php
index adf2555..2381866 100644
--- a/h-source/Application/Controllers/GenericController.php
+++ b/h-source/Application/Controllers/GenericController.php
@@ -446,6 +446,18 @@ class GenericController extends BaseController
Params::$nullQueryValue = 'undef';
$data['tree'] = plural($this->controller);
+
+ //look for a string in the model name or in the other_names if the string is different from undef
+ if (strcmp($this->viewArgs['search_string'],"undef") !== 0)
+ {
+ $nWhere = array(
+ 'OR' => array(
+ 'model' => "like '%".$this->viewArgs['search_string']."%'",
+ 'other_names' => "like '%".$this->viewArgs['search_string']."%'",
+ ),
+ );
+ $this->mod->aWhere($nWhere);
+ }
$this->mod->aWhere(array("deleted"=>"no","cleared"=>"no"));