From 4653674fa971b614c66314c22fdac4b9b06e7c70 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 1 Apr 2010 20:57:15 +0000 Subject: [PATCH] Define colums_to_search and use search2criteria() to get extra search functionality --- resources/inc/class.bo_resources.inc.php | 2 +- resources/inc/class.so_resources.inc.php | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/inc/class.bo_resources.inc.php b/resources/inc/class.bo_resources.inc.php index 4d8828bd78..ab271f8a9a 100755 --- a/resources/inc/class.bo_resources.inc.php +++ b/resources/inc/class.bo_resources.inc.php @@ -69,7 +69,7 @@ class bo_resources } } if ($this->debug) _debug_array($query); - $criteria = array('name' => $query['search'], 'short_description' => $query['search'], 'inventory_number' => $query['search']); + $criteria = $query['search']; $read_onlys = 'res_id,name,short_description,quantity,useable,bookable,buyable,cat_id,location,storage_info'; $accessory_of = $query['view_accs_of'] ? $query['view_accs_of'] : -1; diff --git a/resources/inc/class.so_resources.inc.php b/resources/inc/class.so_resources.inc.php index edd3284f28..4bdaea25fc 100755 --- a/resources/inc/class.so_resources.inc.php +++ b/resources/inc/class.so_resources.inc.php @@ -24,6 +24,9 @@ class so_resources extends so_sql $this->customfields = config::get_customfields('resources'); $this->soextra = new so_sql('resources','egw_resources_extra'); + + $this->columns_to_search = array('name','short_description','inventory_number','long_description','location'); + } /**