From 989b39b6282f349bf78ef5de5ebf07271d86b02a Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 12 Sep 2012 06:29:12 -0400
Subject: [PATCH] Bugfix: Database Update through remoting api

---
 interface/web/dashboard/ajax_get_json.php |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php
index 817853d..9aa22ff 100644
--- a/interface/web/dashboard/ajax_get_json.php
+++ b/interface/web/dashboard/ajax_get_json.php
@@ -42,7 +42,7 @@
 
 	
 	if($type == 'globalsearch'){
-		$q = $app->db->quote($_GET["q"]);
+		$q = $app->db->quote(trim($_GET["q"]));
 		$authsql = " AND ".$app->tform->getAuthSQL('r');
 		$modules = explode(',', $_SESSION['s']['user']['modules']);
 		
@@ -88,6 +88,9 @@
 		*/
 		$result[] = _search('sites', 'database');
 		
+		// database users
+		$result[] = _search('sites', 'database_user');
+		
 		// email domains
 		$result[] = _search('mail', 'mail_domain');
 		
@@ -132,6 +135,9 @@
 		
 		// virtual machines ip addresses
 		$result[] = _search('vm', 'openvz_ip');
+		
+		// directive snippets
+		$result[] = _search('admin', 'directive_snippets');
 
 		$json = $app->functions->json_encode($result);
 	}

--
Gitblit v1.9.1