Commit 2be07219 authored by Brian's avatar Brian
Browse files

Merge branch 'develop' of https://git.ispconfig.org/branov/ispconfig3 into develop

parents 5f1e170b 313df06b
Pipeline #6278 passed with stage
in 11 seconds
...@@ -196,6 +196,7 @@ CREATE TABLE `client` ( ...@@ -196,6 +196,7 @@ CREATE TABLE `client` (
`limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n',
`limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n',
`limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n',
`default_directive_snippet` INT(3) NULL DEFAULT NULL,
`default_webserver` int(11) unsigned NOT NULL DEFAULT '1', `default_webserver` int(11) unsigned NOT NULL DEFAULT '1',
`web_servers` text, `web_servers` text,
`limit_web_ip` text, `limit_web_ip` text,
...@@ -326,6 +327,7 @@ CREATE TABLE `client_template` ( ...@@ -326,6 +327,7 @@ CREATE TABLE `client_template` (
`limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n',
`limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n',
`limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n',
`default_directive_snippet` INT(3) NULL DEFAULT NULL,
`web_servers` text, `web_servers` text,
`limit_web_ip` text, `limit_web_ip` text,
`limit_web_domain` int(11) NOT NULL default '-1', `limit_web_domain` int(11) NOT NULL default '-1',
......
...@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, ...@@ -26,7 +26,7 @@ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
-- --
-- These SQL commands will be executed before the ISPConfig update is performed. -- These SQL commands will be executed before the ISPConfig update is performed.
-- --
...@@ -43,4 +43,8 @@ DROP TABLE IF EXISTS `domain_handle`; ...@@ -43,4 +43,8 @@ DROP TABLE IF EXISTS `domain_handle`;
DROP TABLE IF EXISTS `domain_provider`; DROP TABLE IF EXISTS `domain_provider`;
DROP TABLE IF EXISTS `domain_tld`; DROP TABLE IF EXISTS `domain_tld`;
SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;
\ No newline at end of file
-- Default Directive Snippets --
ALTER TABLE `client` ADD `default_directive_snippet` INT(3) NULL DEFAULT NULL AFTER `limit_xmpp_httparchive`;
ALTER TABLE `client_template` ADD `default_directive_snippet` INT(3) NULL DEFAULT NULL AFTER `web_servers`;
\ No newline at end of file
...@@ -672,6 +672,17 @@ $form["tabs"]['limits'] = array ( ...@@ -672,6 +672,17 @@ $form["tabs"]['limits'] = array (
'default' => 'n', 'default' => 'n',
'valuelimit' => 'client:limit_directive_snippets', 'valuelimit' => 'client:limit_directive_snippets',
'value' => array(0 => 'n', 1 => 'y') 'value' => array(0 => 'n', 1 => 'y')
),
'default_directive_snippet' => array (
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => '',
'value' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE active='y' AND type='apache' AND required_php_snippets != '' AND {AUTHSQL} ORDER BY directive_snippets_id",
'keyfield'=> 'directive_snippets_id',
'valuefield'=> 'name'
),
),/* ),/*
'default_dnsserver' => array ( 'default_dnsserver' => array (
'datatype' => 'INTEGER', 'datatype' => 'INTEGER',
......
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'Servidores xmpp'; ...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'Servidores xmpp';
$wb['db_servers_txt'] = 'Servidores de banco de dados'; $wb['db_servers_txt'] = 'Servidores de banco de dados';
$wb['mail_servers_txt'] = 'Servidores de e-mail'; $wb['mail_servers_txt'] = 'Servidores de e-mail';
$wb['Limits'] = 'Limites'; $wb['Limits'] = 'Limites';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -116,10 +116,12 @@ $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available'; ...@@ -116,10 +116,12 @@ $wb['limit_xmpp_proxy_txt'] = 'Bytestream proxy available';
$wb['limit_xmpp_status_txt'] = 'Status host available'; $wb['limit_xmpp_status_txt'] = 'Status host available';
$wb['dns_servers_txt'] = 'DNS servery'; $wb['dns_servers_txt'] = 'DNS servery';
$wb['limit_ssl_letsencrypt_txt'] = 'Lets Encrypt SSL - dostupná volba pro klienta'; $wb['limit_ssl_letsencrypt_txt'] = 'Lets Encrypt SSL - dostupná volba pro klienta';
$wb['limit_directive_snippets_txt'] = 'Výběr configurace webového serveru - dostupná volba pro klienta'; $wb['limit_directive_snippets_txt'] = 'Výběr konfigurace webového serveru - dostupná volba pro klienta';
$wb['limit_database_user_txt'] = 'Max. počet databázových uživatelů'; $wb['limit_database_user_txt'] = 'Max. počet databázových uživatelů';
$wb['web_servers_txt'] = 'Webové servery'; $wb['web_servers_txt'] = 'Webové servery';
$wb['db_servers_txt'] = 'Databázové servery'; $wb['db_servers_txt'] = 'Databázové servery';
$wb['mail_servers_txt'] = 'E-mailové servery'; $wb['mail_servers_txt'] = 'E-mailové servery';
$wb['Limits'] = 'Limity'; $wb['Limits'] = 'Limity';
$wb['default_directive_snippet_txt'] = 'Výchozí konfigurace webového serveru';
$wb['default_directive_snippet_none_txt'] = 'Žádná';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Web-Server'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Web-Server';
$wb['db_servers_txt'] = 'Datenbank-Server'; $wb['db_servers_txt'] = 'Datenbank-Server';
$wb['mail_servers_txt'] = 'Mail-Server'; $wb['mail_servers_txt'] = 'Mail-Server';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'XMPP Servers'; ...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'XMPP Servers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Web-серверы'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Web-серверы';
$wb['db_servers_txt'] = 'Серверы баз данных'; $wb['db_servers_txt'] = 'Серверы баз данных';
$wb['mail_servers_txt'] = 'Серверы почты'; $wb['mail_servers_txt'] = 'Серверы почты';
$wb['Limits'] = 'Лимиты'; $wb['Limits'] = 'Лимиты';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers'; ...@@ -122,4 +122,6 @@ $wb['web_servers_txt'] = 'Webservers';
$wb['db_servers_txt'] = 'Database servers'; $wb['db_servers_txt'] = 'Database servers';
$wb['mail_servers_txt'] = 'Mailservers'; $wb['mail_servers_txt'] = 'Mailservers';
$wb['Limits'] = 'Limits'; $wb['Limits'] = 'Limits';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'XMPP Sunucuları'; ...@@ -125,4 +125,6 @@ $wb['xmpp_servers_txt'] = 'XMPP Sunucuları';
$wb['db_servers_txt'] = 'Veritabanı Sunucuları'; $wb['db_servers_txt'] = 'Veritabanı Sunucuları';
$wb['mail_servers_txt'] = 'E-posta Sunucuları'; $wb['mail_servers_txt'] = 'E-posta Sunucuları';
$wb['Limits'] = 'Sınırlar'; $wb['Limits'] = 'Sınırlar';
$wb['default_directive_snippet_txt'] = 'Default Directive snippet';
$wb['default_directive_snippet_none_txt'] = 'None';
?> ?>
...@@ -124,7 +124,14 @@ ...@@ -124,7 +124,14 @@
<div class="col-sm-9"> <div class="col-sm-9">
{tmpl_var name='limit_directive_snippets'} {tmpl_var name='limit_directive_snippets'}
</div> </div>
</div> </div>
<div class="form-group">
<label for="limit_cron_type" class="col-sm-3 control-label">{tmpl_var name='default_directive_snippet_txt'}</label>
<div class="col-sm-9"><select name="default_directive_snippet" id="default_directive_snippet" class="form-control">
<option value="0">{tmpl_vat name='default_directive_snippet_none_txt'}</option>
{tmpl_var name='default_directive_snippet'}
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -1085,6 +1085,15 @@ class page_action extends tform_actions { ...@@ -1085,6 +1085,15 @@ class page_action extends tform_actions {
// Clients may not set the client_group_id, so we unset them if user is not a admin and the client is not a reseller // Clients may not set the client_group_id, so we unset them if user is not a admin and the client is not a reseller
if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]); if(!$app->auth->has_clients($_SESSION['s']['user']['userid'])) unset($this->dataRecord["client_group_id"]);
# Get default directive snippets defined in client template
$default_directive_snippet = $app->db->queryOneRecord("SELECT client.default_directive_snippet FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = ?", $client_group_id);
if($default_directive_snippet['default_directive_snippet'] != '0') {
# Set Default directive snippet only if there is no custom per website already configured
if($this->dataRecord['directive_snippets_id'] == '0') {
$this->dataRecord['directive_snippets_id'] = intval($default_directive_snippet['default_directive_snippet']);
}
}
} }
//* make sure that the domain is lowercase //* make sure that the domain is lowercase
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment