Merge pull request #318 from Churro/froxlorMerge_33ab67a

Feature: vHost templates (version 2)
This commit is contained in:
Michael Kaufmann
2016-02-26 19:16:49 +01:00
22 changed files with 766 additions and 39 deletions

View File

@@ -150,6 +150,22 @@ return array(
),
'value' => array()
),
'vhost_usedefaultlocation' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array('1')
),
'vhostsettingid' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
'type' => 'select',
'select_var' => $vhostconfigs
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',

View File

@@ -84,7 +84,7 @@ return array(
'value' => $result['registration_date'],
'size' => 10
),
'termination_date' => array(
'termination_date' => array(
'label' => $lng['domains']['termination_date'],
'desc' => $lng['panel']['dateformat'],
'type' => 'text',
@@ -162,6 +162,22 @@ return array(
),
'value' => array($result['speciallogfile'])
),
'vhost_usedefaultlocation' => array(
'visible' => (Settings::Get('system.webserver') == 'nginx' ? true : false),
'label' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['title'],
'desc' => $lng['admin']['vhostconfig']['vhost_usedefaultlocation']['desc'],
'type' => 'checkbox',
'values' => array(
array ('label' => $lng['panel']['yes'], 'value' => '1')
),
'value' => array($result['vhost_usedefaultlocation'])
),
'vhostsettingid' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
'type' => 'select',
'select_var' => $vhostconfigs
),
'specialsettings' => array(
'visible' => ($userinfo['change_serversettings'] == '1' ? true : false),
'style' => 'align-top',

View File

@@ -0,0 +1,43 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2016 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'vhostconfig_add' => array(
'title' => $lng['admin']['vhostsettings']['addsettings'],
'image' => 'icons/vhostsettings_add.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['vhostsettings']['addnew'],
'image' => 'icons/vhostsettings_add.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'type' => 'text',
'maxlength' => 50
),
'vhostsettings' => array(
'style' => 'align-top',
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
'type' => 'textarea',
'cols' => 100,
'rows' => 30
)
)
)
)
)
);

View File

@@ -0,0 +1,45 @@
<?php
/**
* This file is part of the Froxlor project.
* Copyright (c) 2016 the Froxlor Team (see authors).
*
* For the full copyright and license information, please view the COPYING
* file that was distributed with this source code. You can also view the
* COPYING file online at http://files.froxlor.org/misc/COPYING.txt
*
* @copyright (c) the authors
* @author Froxlor team <team@froxlor.org> (2010-)
* @license GPLv2 http://files.froxlor.org/misc/COPYING.txt
* @package Formfields
*
*/
return array(
'vhostconfig_edit' => array(
'title' => $lng['admin']['vhostsettings']['editsettings'],
'image' => 'icons/vhostsettings_edit.png',
'sections' => array(
'section_a' => array(
'title' => $lng['admin']['vhostsettings']['editsettings'],
'image' => 'icons/vhostsettings_edit.png',
'fields' => array(
'description' => array(
'label' => $lng['admin']['phpsettings']['description'],
'type' => 'text',
'maxlength' => 50,
'value' => $result['description']
),
'vhostsettings' => array(
'style' => 'align-top',
'label' => $lng['admin']['vhostsettings']['vhostsettings'],
'type' => 'textarea',
'cols' => 100,
'rows' => 30,
'value' => $result['vhostsettings']
)
)
)
)
)
);

View File

@@ -246,6 +246,14 @@ return array (
'label' => $lng['admin']['integritycheck'],
'required_resources' => 'change_serversettings',
),
array (
'url' => 'admin_vhostsettings.php?page=overview',
'label' => $lng['menue']['vhostsettings']['maintitle'],
'show_element' => (
Settings::Get('system.mod_fcgid') == true ||
Settings::Get('phpfpm.enabled') == true
),
),
array (
'url' => 'admin_autoupdate.php?page=overview',
'label' => $lng['admin']['autoupdate'],

View File

@@ -45,6 +45,7 @@ define('TABLE_PANEL_TICKETS', 'panel_tickets');
define('TABLE_PANEL_TICKET_CATS', 'panel_ticket_categories');
define('TABLE_PANEL_LOG', 'panel_syslog');
define('TABLE_PANEL_PHPCONFIGS', 'panel_phpconfigs');
define('TABLE_PANEL_VHOSTCONFIGS', 'panel_vhostconfigs');
define('TABLE_PANEL_CRONRUNS', 'cronjobs_run');
define('TABLE_PANEL_REDIRECTCODES', 'redirect_codes');
define('TABLE_PANEL_DOMAINREDIRECTS', 'domain_redirect_codes');

View File

@@ -16,7 +16,7 @@
*/
// Main version variable
$version = '0.9.35-dev5';
$version = '0.9.35-dev6';
// Database version (unused, old stuff from SysCP)
$dbversion = '2';