From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001
From: Marius Burkard <m.burkard@pixcept.de>
Date: Sun, 10 Jul 2016 05:02:35 -0400
Subject: [PATCH] Merge branch 'stable-3.1'
---
interface/web/sites/form/web_vhost_domain.tform.php | 80 ++++++++++++++++++++++++++++++++++++----
1 files changed, 72 insertions(+), 8 deletions(-)
diff --git a/interface/web/sites/form/web_vhost_domain.tform.php b/interface/web/sites/form/web_vhost_domain.tform.php
index c342605..1bbc148 100644
--- a/interface/web/sites/form/web_vhost_domain.tform.php
+++ b/interface/web/sites/form/web_vhost_domain.tform.php
@@ -41,16 +41,19 @@
$vhostdomain_type = 'domain';
$form_title = "Web Domain";
$validator_function = 'web_domain';
+$first_tab_title = "Domain";
if(isset($_SESSION['s']['var']['vhostdomain_type'])) {
if($_SESSION['s']['var']['vhostdomain_type'] == 'subdomain') {
$vhostdomain_type = 'subdomain';
$form_title = "Subdomain";
$validator_function = 'sub_domain';
+ $first_tab_title = "Subdomain";
} elseif($_SESSION['s']['var']['vhostdomain_type'] == 'aliasdomain') {
$vhostdomain_type = 'aliasdomain';
$form_title = "Aliasdomain";
$validator_function = 'alias_domain';
+ $first_tab_title = "Aliasdomain";
}
}
@@ -85,10 +88,11 @@
$backup_available = ($vhostdomain_type == 'domain');
if(!$app->auth->is_admin()) {
$client_group_id = $_SESSION["s"]["user"]["default_group"];
- $client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
+ $client = $app->db->queryOneRecord("SELECT limit_wildcard, limit_ssl, limit_ssl_letsencrypt, limit_backup FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
if($client['limit_wildcard'] != 'y') $wildcard_available = false;
if($client['limit_ssl'] != 'y') $ssl_available = false;
+ if($client['limit_ssl_letsencrypt'] == 'y') $ssl_available = false;
if($client['limit_backup'] != 'y') $backup_available = false;
}
@@ -96,7 +100,7 @@
$web_config = $app->getconf->get_global_config('sites');
$form["tabs"]['domain'] = array (
- 'title' => "Domain",
+ 'title' => $first_tab_title,
'width' => 100,
'template' => "templates/web_vhost_domain_edit.htm",
'readonly' => $web_domain_edit_readonly,
@@ -236,6 +240,12 @@
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
+ 'ssl_letsencrypt' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
'php' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -272,6 +282,15 @@
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'enable_pagespeed' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array (
+ 0 => 'n',
+ 1 => 'y'
+ )
),
'active' => array (
'datatype' => 'VARCHAR',
@@ -324,6 +343,18 @@
'errmsg'=> 'domain_error_autosub'
),
);
+ $form['tabs']['domain']['fields']['web_folder'] = array (
+ 'datatype' => 'VARCHAR',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
+ 'errmsg'=> 'web_folder_error_regex'),
+ ),
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '30',
+ 'maxlength' => '255'
+ );
} else {
$form['tabs']['domain']['fields']['parent_domain_id']['datasource'] = array (
'type' => 'SQL',
@@ -334,7 +365,7 @@
$form['tabs']['domain']['fields']['web_folder'] = array (
'datatype' => 'VARCHAR',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '@^((?!.*\.\.)[\w/_\.\-]{1,100})$@',
+ 'regex' => '@^((?!(.*\.\.)|(.*\./)|(.*//))[^/][\w/_\.\-]{1,100})?$@',
'errmsg'=> 'web_folder_error_regex'),
),
'formtype' => 'TEXT',
@@ -388,6 +419,15 @@
'width' => '30',
'maxlength' => '255'
),
+ 'rewrite_to_https' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array (
+ 0 => 'n',
+ 1 => 'y'
+ )
+ ),
//#################################
// ENDE Datatable fields
//#################################
@@ -408,7 +448,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+ 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
'errmsg'=> 'ssl_state_error_regex'),
),
'default' => '',
@@ -420,7 +460,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+ 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
'errmsg'=> 'ssl_locality_error_regex'),
),
'default' => '',
@@ -432,7 +472,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+ 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
'errmsg'=> 'ssl_organisation_error_regex'),
),
'default' => '',
@@ -444,7 +484,7 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{1,255}))$/',
+ 'regex' => '/^(([\.]{0})|([-a-zA-Z0-9._,&äöüÄÖÜ ]{0,255}))$/',
'errmsg'=> 'ssl_organistaion_unit_error_regex'),
),
'default' => '',
@@ -584,7 +624,7 @@
$form["tabs"]['backup'] = array (
'title' => "Backup",
'width' => 100,
- 'template' => "templates/web_domain_backup.htm",
+ 'template' => "templates/web_vhost_domain_backup.htm",
'readonly' => false,
'fields' => array (
//#################################
@@ -854,6 +894,30 @@
'rows' => '',
'cols' => ''
),
+ 'http_port' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^([0-9]{1,5})$/',
+ 'errmsg'=> 'http_port_error_regex'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '3',
+ 'maxlength' => '6'
+ ),
+ 'https_port' => array (
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^([0-9]{1,5})$/',
+ 'errmsg'=> 'https_port_error_regex'),
+ ),
+ 'default' => '0',
+ 'value' => '',
+ 'width' => '3',
+ 'maxlength' => '6'
+ )
//#################################
// ENDE Datatable fields
//#################################
--
Gitblit v1.9.1