From 0cd87e682012f224e2b74531190bb983fdcbb430 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Sun, 10 Jan 2016 03:31:27 -0500
Subject: [PATCH] Revert "allow 0 for ISINT"
---
interface/web/sites/form/web_vhost_domain.tform.php | 47 +++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 43 insertions(+), 4 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..c447b1e 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,7 +88,7 @@
$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_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;
@@ -96,7 +99,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 +239,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 +281,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 +342,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 +364,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',
@@ -387,6 +417,15 @@
'value' => '',
'width' => '30',
'maxlength' => '255'
+ ),
+ 'rewrite_to_https' => array (
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array (
+ 0 => 'n',
+ 1 => 'y'
+ )
),
//#################################
// ENDE Datatable fields
@@ -584,7 +623,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 (
//#################################
--
Gitblit v1.9.1