From 5a9c50a9e8705f92f1830606ddbdd98fed174ba8 Mon Sep 17 00:00:00 2001
From: Marius Cramer <m.cramer@pixcept.de>
Date: Fri, 24 Jan 2014 06:31:41 -0500
Subject: [PATCH] Merge branch 'master' into 'master'
---
interface/web/sites/form/web_childdomain.tform.php | 58 +++++++++++++++++++++++++++++++++-------------------------
1 files changed, 33 insertions(+), 25 deletions(-)
diff --git a/interface/web/sites/form/web_aliasdomain.tform.php b/interface/web/sites/form/web_childdomain.tform.php
similarity index 87%
rename from interface/web/sites/form/web_aliasdomain.tform.php
rename to interface/web/sites/form/web_childdomain.tform.php
index 35762ef..1081a23 100644
--- a/interface/web/sites/form/web_aliasdomain.tform.php
+++ b/interface/web/sites/form/web_childdomain.tform.php
@@ -37,16 +37,18 @@
*/
+$childdomain_type = 'aliasdomain';
+if(isset($_SESSION['s']['var']['childdomain_type']) && $_SESSION['s']['var']['childdomain_type'] == 'subdomain') $childdomain_type = 'subdomain';
-$form["title"] = "Web Aliasdomain";
+$form["title"] = ($childdomain_type == 'subdomain' ? "Subdomain" : 'Web Aliasdomain');
$form["description"] = "";
-$form["name"] = "web_aliasdomain";
-$form["action"] = "web_aliasdomain_edit.php";
+$form["name"] = "web_childdomain";
+$form["action"] = "web_childdomain_edit.php";
$form["db_table"] = "web_domain";
$form["db_table_idx"] = "domain_id";
$form["db_history"] = "yes";
$form["tab_default"] = "domain";
-$form["list_default"] = "web_aliasdomain_list.php";
+$form["list_default"] = "web_childdomain_list.php";
$form["auth"] = 'yes'; // yes / no
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
@@ -58,7 +60,7 @@
$form["tabs"]['domain'] = array (
'title' => "Domain",
'width' => 100,
- 'template' => "templates/web_aliasdomain_edit.htm",
+ 'template' => "templates/web_childdomain_edit.htm",
'fields' => array (
//#################################
// Begin Datatable fields
@@ -86,7 +88,7 @@
),
'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
'class' => 'validate_domain',
- 'function' => 'alias_domain',
+ 'function' => ($childdomain_type == 'subdomain' ? 'sub_domain' : 'alias_domain'),
'errmsg'=> 'domain_error_regex'),
),
'default' => '',
@@ -110,7 +112,8 @@
'keyfield'=> 'domain_id',
'valuefield'=> 'parent_domain'
),
- 'value' => ''
+ 'value' => '',
+ 'searchable' => 2
),
'redirect_type' => array (
'datatype' => 'VARCHAR',
@@ -130,23 +133,6 @@
'width' => '30',
'maxlength' => '255'
),
- 'subdomain' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'default' => 'www',
- 'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
- 'class' => 'validate_domain',
- 'function' => 'web_domain_autosub',
- 'errmsg'=> 'domain_error_autosub'),
- ),
- 'value' => array('none' => 'none_txt', 'www' => 'www.', '*' => '*.')
- ),
- 'seo_redirect' => array (
- 'datatype' => 'VARCHAR',
- 'formtype' => 'SELECT',
- 'default' => '',
- 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld')
- ),
'active' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -159,12 +145,34 @@
)
);
+if($childdomain_type == 'aliasdomain') {
+ // additional fields for alias domains
+ $form["tabs"]['domain']['fields']['subdomain'] = array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => 'www',
+ 'validators' => array ( 0 => array ( 'type' => 'CUSTOM',
+ 'class' => 'validate_domain',
+ 'function' => 'web_domain_autosub',
+ 'errmsg'=> 'domain_error_autosub'),
+ ),
+ 'value' => array('none' => 'none_txt', 'www' => 'www.', '*' => '*.')
+ );
+ $form["tabs"]['domain']['fields']['seo_redirect'] = array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'SELECT',
+ 'default' => '',
+ 'value' => array('' => 'no_redirect_txt', 'non_www_to_www' => 'domain.tld => www.domain.tld', 'www_to_non_www' => 'www.domain.tld => domain.tld', '*_domain_tld_to_domain_tld' => '*.doman.tld => domain.tld', '*_domain_tld_to_www_domain_tld' => '*.domain.tld => www.domain.tld', '*_to_domain_tld' => '* => domain.tld', '*_to_www_domain_tld' => '* => www.domain.tld')
+ );
+
+}
+
if($_SESSION["s"]["user"]["typ"] == 'admin') {
$form["tabs"]['advanced'] = array (
'title' => "Options",
'width' => 100,
- 'template' => "templates/web_aliasdomain_advanced.htm",
+ 'template' => "templates/web_childdomain_advanced.htm",
'readonly' => false,
'fields' => array (
//#################################
--
Gitblit v1.9.1