### Eclipse Workspace Patch 1.0
#P 1.8.5
Index: frontends/php/api/classes/class.ctrigger.php
===================================================================
--- frontends/php/api/classes/class.ctrigger.php	(revision 21032)
+++ frontends/php/api/classes/class.ctrigger.php	(working copy)
@@ -102,6 +102,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'expandData'			=> null,
Index: frontends/php/api/classes/class.chistory.php
===================================================================
--- frontends/php/api/classes/class.chistory.php	(revision 21032)
+++ frontends/php/api/classes/class.chistory.php	(working copy)
@@ -76,6 +76,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 			'time_from'				=> null,
 			'time_till'				=> null,
Index: frontends/php/api/classes/class.citem.php
===================================================================
--- frontends/php/api/classes/class.citem.php	(revision 21032)
+++ frontends/php/api/classes/class.citem.php	(working copy)
@@ -100,6 +100,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.capplication.php
===================================================================
--- frontends/php/api/classes/class.capplication.php	(revision 21032)
+++ frontends/php/api/classes/class.capplication.php	(working copy)
@@ -82,6 +82,7 @@
 			'search'				=> null,
 			'startSearch'			=> null,
 			'exludeSearch'			=> null,
+			'searchWildcardsEnabled'=> null,
 
 // OutPut
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cuser.php
===================================================================
--- frontends/php/api/classes/class.cuser.php	(revision 21032)
+++ frontends/php/api/classes/class.cuser.php	(working copy)
@@ -81,6 +81,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'extendoutput'				=> null,
Index: frontends/php/api/classes/class.cscreen.php
===================================================================
--- frontends/php/api/classes/class.cscreen.php	(revision 21032)
+++ frontends/php/api/classes/class.cscreen.php	(working copy)
@@ -76,6 +76,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'extendoutput'				=> null,
Index: frontends/php/include/db.inc.php
===================================================================
--- frontends/php/include/db.inc.php	(revision 21032)
+++ frontends/php/include/db.inc.php	(working copy)
@@ -921,15 +921,23 @@
 			if($tableSchema['fields'][$field]['type'] != DB::FIELD_TYPE_CHAR) continue;
 
 			// escaping parameter that is about to be used in LIKE statement
-			$pattern = str_replace("!", "!!", $pattern);
-			$pattern = str_replace("%", "!%", $pattern);
-			$pattern = str_replace("_", "!_", $pattern);
+			if(empty($options['searchWildcardsEnabled'])){
+				$pattern = str_replace("!", "!!", $pattern);
+				$pattern = str_replace("%", "!%", $pattern);
+				$pattern = str_replace("_", "!_", $pattern);
 
-			$search[$field] =
-				' UPPER('.$tableShort.'.'.$field.') '.
-				$exclude.' LIKE '.
-				zbx_dbstr($start.zbx_strtoupper($pattern).'%').
-				" ESCAPE '!'";
+				$search[$field] =
+					' UPPER('.$tableShort.'.'.$field.') '.
+					$exclude.' LIKE '.
+					zbx_dbstr($start.zbx_strtoupper($pattern).'%').
+					" ESCAPE '!'";
+			}
+			else{
+				$search[$field] =
+					' UPPER('.$tableShort.'.'.$field.') '.
+					$exclude.' LIKE '.
+					zbx_dbstr(zbx_strtoupper($pattern));
+			}
 		}
 
 		if(!empty($search)) $sql_parts['where']['search'] = '( '.implode(' OR ', $search).' )';
Index: frontends/php/api/classes/class.cdservice.php
===================================================================
--- frontends/php/api/classes/class.cdservice.php	(revision 21032)
+++ frontends/php/api/classes/class.cdservice.php	(working copy)
@@ -102,6 +102,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cproxy.php
===================================================================
--- frontends/php/api/classes/class.cproxy.php	(revision 21032)
+++ frontends/php/api/classes/class.cproxy.php	(working copy)
@@ -75,6 +75,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'extendoutput'				=> null,
Index: frontends/php/api/classes/class.cdrule.php
===================================================================
--- frontends/php/api/classes/class.cdrule.php	(revision 21032)
+++ frontends/php/api/classes/class.cdrule.php	(working copy)
@@ -70,6 +70,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // output
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cmediatype.php
===================================================================
--- frontends/php/api/classes/class.cmediatype.php	(revision 21032)
+++ frontends/php/api/classes/class.cmediatype.php	(working copy)
@@ -78,6 +78,8 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
+
 // OutPut
 			'extendoutput'				=> null,
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cusermacro.php
===================================================================
--- frontends/php/api/classes/class.cusermacro.php	(revision 21032)
+++ frontends/php/api/classes/class.cusermacro.php	(working copy)
@@ -97,6 +97,8 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
+
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
 			'extendoutput'				=> null,
Index: frontends/php/api/classes/class.cdhost.php
===================================================================
--- frontends/php/api/classes/class.cdhost.php	(revision 21032)
+++ frontends/php/api/classes/class.cdhost.php	(working copy)
@@ -101,6 +101,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cdcheck.php
===================================================================
--- frontends/php/api/classes/class.cdcheck.php	(revision 21032)
+++ frontends/php/api/classes/class.cdcheck.php	(working copy)
@@ -57,6 +57,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cmap.php
===================================================================
--- frontends/php/api/classes/class.cmap.php	(revision 21032)
+++ frontends/php/api/classes/class.cmap.php	(working copy)
@@ -81,6 +81,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'extendoutput'				=> null,
Index: frontends/php/api/classes/class.chost.php
===================================================================
--- frontends/php/api/classes/class.chost.php	(revision 21032)
+++ frontends/php/api/classes/class.chost.php	(working copy)
@@ -120,6 +120,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cusergroup.php
===================================================================
--- frontends/php/api/classes/class.cusergroup.php	(revision 21032)
+++ frontends/php/api/classes/class.cusergroup.php	(working copy)
@@ -81,6 +81,8 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
+
 // OutPut
 			'extendoutput'				=> null,
 			'editable'					=> null,
Index: frontends/php/api/classes/class.cmaintenance.php
===================================================================
--- frontends/php/api/classes/class.cmaintenance.php	(revision 21032)
+++ frontends/php/api/classes/class.cmaintenance.php	(working copy)
@@ -77,7 +77,8 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
-			'filter'				=> null,
+			'filter'					=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cscript.php
===================================================================
--- frontends/php/api/classes/class.cscript.php	(revision 21032)
+++ frontends/php/api/classes/class.cscript.php	(working copy)
@@ -76,6 +76,7 @@
 			'search'				=> null,
 			'startSearch'			=> null,
 			'excludeSearch'			=> null,
+			'searchWildcardsEnabled'=> null,
 
 // OutPut
 			'extendoutput'			=> null,
Index: frontends/php/api/classes/class.calert.php
===================================================================
--- frontends/php/api/classes/class.calert.php	(revision 21032)
+++ frontends/php/api/classes/class.calert.php	(working copy)
@@ -78,12 +78,13 @@
 			'nopermissions'			=> null,
 
 // filter
-			'filter'					=> null,
-			'search'					=> null,
-			'startSearch'				=> null,
-			'excludeSearch'				=> null,
+			'filter'				=> null,
+			'search'				=> null,
+			'startSearch'			=> null,
+			'excludeSearch'			=> null,
 			'time_from'				=> null,
 			'time_till'				=> null,
+			'searchWildcardsEnabled'=> null,
 
 // OutPut
 			'extendoutput'			=> null,
Index: frontends/php/api/classes/class.ctemplate.php
===================================================================
--- frontends/php/api/classes/class.ctemplate.php	(revision 21032)
+++ frontends/php/api/classes/class.ctemplate.php	(working copy)
@@ -73,6 +73,7 @@
 			'search'					=> '',
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // OutPut
 			'output'					=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cimage.php
===================================================================
--- frontends/php/api/classes/class.cimage.php	(revision 21032)
+++ frontends/php/api/classes/class.cimage.php	(working copy)
@@ -69,6 +69,7 @@
 			'search'				=> null,
 			'startSearch'			=> null,
 			'excludeSearch'			=> null,
+			'searchWildcardsEnabled'=> null,
 
 // OutPut
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.cgraph.php
===================================================================
--- frontends/php/api/classes/class.cgraph.php	(revision 21032)
+++ frontends/php/api/classes/class.cgraph.php	(working copy)
@@ -70,6 +70,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // output
 			'output'				=> API_OUTPUT_REFER,
Index: frontends/php/api/classes/class.caction.php
===================================================================
--- frontends/php/api/classes/class.caction.php	(revision 21032)
+++ frontends/php/api/classes/class.caction.php	(working copy)
@@ -79,6 +79,7 @@
 			'search'				=> null,
 			'startSearch'			=> null,
 			'excludeSearch'			=> null,
+			'searchWildcardsEnabled'=> null,
 
 // OutPut
 			'extendoutput'			=> null,
Index: frontends/php/api/classes/class.chostgroup.php
===================================================================
--- frontends/php/api/classes/class.chostgroup.php	(revision 21032)
+++ frontends/php/api/classes/class.chostgroup.php	(working copy)
@@ -80,6 +80,7 @@
 			'search'					=> null,
 			'startSearch'				=> null,
 			'excludeSearch'				=> null,
+			'searchWildcardsEnabled'	=> null,
 
 // output
 			'output'					=> API_OUTPUT_REFER,
