From 5e29b4c7f758896529185e35e188d93d7cded346 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 09 Oct 2012 12:24:40 -0400
Subject: [PATCH] - Bugfix: alias domain, subdomain, and vhost subdomain results in the global search link to the correct form now.

---
 interface/web/sites/form/web_aliasdomain.tform.php  |    8 +++++++-
 interface/web/sites/lib/lang/en_web_aliasdomain.lng |    3 +++
 interface/web/sites/lib/lang/de_web_aliasdomain.lng |    3 +++
 interface/web/sites/form/web_subdomain.tform.php    |   11 +++++++++--
 interface/web/dashboard/ajax_get_json.php           |   11 ++++++++++-
 5 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/interface/web/dashboard/ajax_get_json.php b/interface/web/dashboard/ajax_get_json.php
index 9aa22ff..e761f3e 100644
--- a/interface/web/dashboard/ajax_get_json.php
+++ b/interface/web/dashboard/ajax_get_json.php
@@ -55,7 +55,16 @@
 		$result[] = _search('client', 'reseller', "AND limit_client != 0");
 		
 		// web sites
-		$result[] = _search('sites', 'web_domain');
+		$result[] = _search('sites', 'web_domain', "AND type = 'vhost'");
+		
+		// subdomains
+		$result[] = _search('sites', 'web_subdomain', "AND type = 'subdomain'");
+		
+		// web site aliases
+		$result[] = _search('sites', 'web_aliasdomain', "AND type = 'alias'");
+		
+		// vhostsubdomains
+		$result[] = _search('sites', 'web_vhost_subdomain', "AND type = 'vhostsubdomain'");
 		
 		// FTP users
 		$result[] = _search('sites', 'ftp_user');
diff --git a/interface/web/sites/form/web_aliasdomain.tform.php b/interface/web/sites/form/web_aliasdomain.tform.php
index 9c5489c..eb7a8f1 100644
--- a/interface/web/sites/form/web_aliasdomain.tform.php
+++ b/interface/web/sites/form/web_aliasdomain.tform.php
@@ -29,6 +29,11 @@
 	Hint:
 	The ID field of the database table is not part of the datafield definition.
 	The ID field must be always auto incement (int or bigint).
+	
+	Search:
+	- searchable = 1 or searchable = 2 include the field in the search
+	- searchable = 1: this field will be the title of the search result
+	- searchable = 2: this field will be included in the description of the search result
 
 
 */
@@ -87,7 +92,8 @@
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
-			'maxlength'	=> '255'
+			'maxlength'	=> '255',
+			'searchable' => 1
 		),
 		'type' => array (
 			'datatype'	=> 'VARCHAR',
diff --git a/interface/web/sites/form/web_subdomain.tform.php b/interface/web/sites/form/web_subdomain.tform.php
index e8d2626..cc03eb9 100644
--- a/interface/web/sites/form/web_subdomain.tform.php
+++ b/interface/web/sites/form/web_subdomain.tform.php
@@ -29,6 +29,11 @@
 	Hint:
 	The ID field of the database table is not part of the datafield definition.
 	The ID field must be always auto incement (int or bigint).
+	
+	Search:
+	- searchable = 1 or searchable = 2 include the field in the search
+	- searchable = 1: this field will be the title of the search result
+	- searchable = 2: this field will be included in the description of the search result
 
 
 */
@@ -87,7 +92,8 @@
 			'default'	=> '',
 			'value'		=> '',
 			'width'		=> '30',
-			'maxlength'	=> '255'
+			'maxlength'	=> '255',
+			'searchable' => 1
 		),
 		'type' => array (
 			'datatype'	=> 'VARCHAR',
@@ -104,7 +110,8 @@
 										'keyfield'=> 'domain_id',
 										'valuefield'=> 'domain'
 									 ),
-			'value'		=> ''
+			'value'		=> '',
+			'searchable' => 2
 		),
 		'redirect_type' => array (
 			'datatype'	=> 'VARCHAR',
diff --git a/interface/web/sites/lib/lang/de_web_aliasdomain.lng b/interface/web/sites/lib/lang/de_web_aliasdomain.lng
new file mode 100644
index 0000000..0060eca
--- /dev/null
+++ b/interface/web/sites/lib/lang/de_web_aliasdomain.lng
@@ -0,0 +1,3 @@
+<?php
+$wb['domain_txt'] = 'Aliasdomain';
+?>
diff --git a/interface/web/sites/lib/lang/en_web_aliasdomain.lng b/interface/web/sites/lib/lang/en_web_aliasdomain.lng
new file mode 100644
index 0000000..0060eca
--- /dev/null
+++ b/interface/web/sites/lib/lang/en_web_aliasdomain.lng
@@ -0,0 +1,3 @@
+<?php
+$wb['domain_txt'] = 'Aliasdomain';
+?>

--
Gitblit v1.9.1