- Hide the option on whether to include default directives with webservers different than nginx

- Typo fix
- Indentation fix
This commit is contained in:
Johannes Feichtner
2016-02-26 19:08:08 +01:00
parent 48a1b9489a
commit 373cb912d8
6 changed files with 15 additions and 13 deletions

View File

@@ -434,7 +434,7 @@ if ($page == 'domains'
} }
$vhostsettingid = 0; $vhostsettingid = 0;
$vhost_usedefaultlocation = 0; $vhost_usedefaultlocation = 1;
if ($userinfo['caneditphpsettings'] == '1' if ($userinfo['caneditphpsettings'] == '1'
|| $userinfo['change_serversettings'] == '1' || $userinfo['change_serversettings'] == '1'
) { ) {
@@ -446,7 +446,7 @@ if ($page == 'domains'
) { ) {
$phpsettingid = (int)$_POST['phpsettingid']; $phpsettingid = (int)$_POST['phpsettingid'];
$vhostsettingid = (int)$_POST['vhostsettingid']; $vhostsettingid = (int)$_POST['vhostsettingid'];
$vhost_usedefaultlocation = (int)$_POST['vhost_usedefaultlocation']; $vhost_usedefaultlocation = isset($_POST['vhost_usedefaultlocation']) ? (int)$_POST['vhost_usedefaultlocation'] : 1;
$phpsettingid_check_stmt = Database::prepare(" $phpsettingid_check_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "`
WHERE `id` = :phpsettingid" WHERE `id` = :phpsettingid"
@@ -1288,7 +1288,7 @@ if ($page == 'domains'
) { ) {
$phpsettingid = (int)$_POST['phpsettingid']; $phpsettingid = (int)$_POST['phpsettingid'];
$vhostsettingid = (int)$_POST['vhostsettingid']; $vhostsettingid = (int)$_POST['vhostsettingid'];
$vhost_usedefaultlocation = (int)$_POST['vhost_usedefaultlocation']; $vhost_usedefaultlocation = isset($_POST['vhost_usedefaultlocation']) ? (int)$_POST['vhost_usedefaultlocation'] : $vhost_usedefaultlocation;
$phpsettingid_check_stmt = Database::prepare(" $phpsettingid_check_stmt = Database::prepare("
SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :phpid SELECT * FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :phpid
"); ");

View File

@@ -3103,11 +3103,11 @@ if (isFroxlorVersion('0.9.35-dev5')) {
showUpdateStep("Adding new panel_vhostconfigs table"); showUpdateStep("Adding new panel_vhostconfigs table");
Database::query("DROP TABLE IF EXISTS `panel_vhostconfigs`;"); Database::query("DROP TABLE IF EXISTS `panel_vhostconfigs`;");
$sql = "CREATE TABLE `" . TABLE_PANEL_VHOSTCONFIGS . "` ( $sql = "CREATE TABLE `" . TABLE_PANEL_VHOSTCONFIGS . "` (
`id` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(50) NOT NULL, `description` varchar(50) NOT NULL,
`vhostsettings` text NOT NULL, `vhostsettings` text NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;"; ) DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;";
Database::query($sql); Database::query($sql);
lastStepStatus(0); lastStepStatus(0);

View File

@@ -151,6 +151,7 @@ return array(
'value' => array() 'value' => array()
), ),
'vhost_usedefaultlocation' => array( 'vhost_usedefaultlocation' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'], 'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'], 'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
'type' => 'checkbox', 'type' => 'checkbox',

View File

@@ -84,7 +84,7 @@ return array(
'value' => $result['registration_date'], 'value' => $result['registration_date'],
'size' => 10 'size' => 10
), ),
'termination_date' => array( 'termination_date' => array(
'label' => $lng['domains']['termination_date'], 'label' => $lng['domains']['termination_date'],
'desc' => $lng['panel']['dateformat'], 'desc' => $lng['panel']['dateformat'],
'type' => 'text', 'type' => 'text',
@@ -163,6 +163,7 @@ return array(
'value' => array($result['speciallogfile']) 'value' => array($result['speciallogfile'])
), ),
'vhost_usedefaultlocation' => array( 'vhost_usedefaultlocation' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'], 'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'], 'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
'type' => 'checkbox', 'type' => 'checkbox',

View File

@@ -1985,5 +1985,5 @@ $lng['admin']['vhostconfig']['ip'] = 'Will be replaced with the IP address of th
$lng['admin']['vhostconfig']['port'] = 'Will be replaced with the port number of the Vhost.'; $lng['admin']['vhostconfig']['port'] = 'Will be replaced with the port number of the Vhost.';
$lng['admin']['vhostconfig']['scheme'] = 'Will be set to <strong>http</strong> or <strong>https</strong> in case SSL / TLS is activated for the Vhost.'; $lng['admin']['vhostconfig']['scheme'] = 'Will be set to <strong>http</strong> or <strong>https</strong> in case SSL / TLS is activated for the Vhost.';
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Use the standard Vhost location directives'; $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Use the standard Vhost location directives';
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'If activated, the standard Vhost location directives, such as <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> are excluded from the Vhost configuration file.'; $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'If deactivated, the standard Vhost location directives, such as <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> are excluded from the Vhost configuration file.';
$lng['question']['vhostsetting_reallydelete'] = 'Do you really want to delete the Vhost template?'; $lng['question']['vhostsetting_reallydelete'] = 'Do you really want to delete the Vhost template?';

View File

@@ -1625,5 +1625,5 @@ $lng['admin']['vhostconfig']['ip'] = 'Wird mit der IP-Adresse des Vhosts ersetzt
$lng['admin']['vhostconfig']['port'] = 'Wird mit dem Port des Vhosts ersetzt.'; $lng['admin']['vhostconfig']['port'] = 'Wird mit dem Port des Vhosts ersetzt.';
$lng['admin']['vhostconfig']['scheme'] = 'Wird mit <strong>http</strong> bzw. mit <strong>https</strong> ersetzt, sofern der Vhost SSL/TLS aktiviert hat.'; $lng['admin']['vhostconfig']['scheme'] = 'Wird mit <strong>http</strong> bzw. mit <strong>https</strong> ersetzt, sofern der Vhost SSL/TLS aktiviert hat.';
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Standard VHost location-Direktiven verwenden'; $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'] = 'Standard VHost location-Direktiven verwenden';
$lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'Wenn aktiviert, werden die Standard VHost-Direktiven wie <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> nicht in die Konfigurationsdatei geschrieben.'; $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'] = 'Wenn deaktiviert, werden Standard VHost-Direktiven wie <br>location / { ... }<br> location @rewrites { ... }<br> location ~ ^(.+?\.php)(/.*)?$ { ... }<br> nicht in die Konfigurationsdatei geschrieben.';
$lng['question']['vhostsetting_reallydelete'] = 'Wollen Sie diese VHost-Vorlage wirklich löschen?'; $lng['question']['vhostsetting_reallydelete'] = 'Wollen Sie diese VHost-Vorlage wirklich löschen?';