diff --git a/install/dist/lib/centos72.lib.php b/install/dist/lib/centos72.lib.php new file mode 100644 index 0000000000000000000000000000000000000000..3dcd7494d3326bd3618d229c950518e8c200f3e4 --- /dev/null +++ b/install/dist/lib/centos72.lib.php @@ -0,0 +1,40 @@ +<?php + +/* +Copyright (c) 2014, Till Brehm, ISPConfig UG +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +require_once realpath(dirname(__FILE__)) . '/centos_base.lib.php'; + +class installer extends installer_centos { + + protected $clamav_socket = '/var/run/clamd.amavisd/clamd.sock'; + + // everything else is inherited from installer_centos class +} + +?> diff --git a/install/dist/lib/centos_base.lib.php b/install/dist/lib/centos_base.lib.php index 74ff8be41b78d806bbac97c856842d428bfc2a8b..d6deb7e27a8b8c6515d343fa1ba3e53a7ebc3000 100644 --- a/install/dist/lib/centos_base.lib.php +++ b/install/dist/lib/centos_base.lib.php @@ -33,7 +33,7 @@ class installer_centos extends installer_dist { protected $clamav_socket = '/tmp/clamd.socket'; public function configure_amavis() { - global $conf; + global $conf, $dist; // amavisd user config file $configfile = 'fedora_amavisd_conf'; @@ -50,6 +50,12 @@ class installer_centos extends installer_dist { $content = str_replace('/var/spool/amavisd/clamd.sock', $this->clamav_socket, $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); + + // for CentOS 7.2 only + if($dist['confid'] == 'centos72') { + chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750); + chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis'); + } // Adding the amavisd commands to the postfix configuration diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php index 11ce4200f038c2943f6a60c102efe7508376b22f..4b6dcd38f250dbb6bab08b67b55e635198080eb1 100644 --- a/install/dist/lib/fedora.lib.php +++ b/install/dist/lib/fedora.lib.php @@ -89,6 +89,9 @@ class installer_dist extends installer_base { //* mysql-virtual_relayrecipientmaps.cf $this->process_postfix_config('mysql-virtual_relayrecipientmaps.cf'); + + //* mysql-virtual_outgoing_bcc.cf + $this->process_postfix_config('mysql-virtual_outgoing_bcc.cf'); //* mysql-virtual_policy_greylist.cf $this->process_postfix_config('mysql-virtual_policy_greylist.cf'); @@ -179,6 +182,7 @@ class installer_dist extends installer_base { //if(!is_file('/var/lib/mailman/data/aliases')) touch('/var/lib/mailman/data/aliases'); if(is_file('/var/lib/mailman/data/aliases')) unlink('/var/lib/mailman/data/aliases'); if(!is_link('/var/lib/mailman/data/aliases')) symlink('/etc/mailman/aliases', '/var/lib/mailman/data/aliases'); + if(!is_file('/etc/mailman/aliases')) touch('/etc/mailman/aliases'); exec('postalias /var/lib/mailman/data/aliases'); if(!is_file('/etc/mailman/virtual-mailman')) touch('/etc/mailman/virtual-mailman'); exec('postmap /etc/mailman/virtual-mailman'); @@ -476,7 +480,7 @@ class installer_dist extends installer_base { } public function configure_amavis() { - global $conf; + global $conf, $dist; // amavisd user config file $configfile = 'fedora_amavisd_conf'; @@ -491,6 +495,12 @@ class installer_dist extends installer_base { $content = str_replace('{hostname}', $conf['hostname'], $content); wf($conf["amavis"]["config_dir"].'/amavisd.conf', $content); chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0640); + + // for CentOS 7.2 only + if($dist['confid'] == 'centos72') { + chmod($conf['amavis']['config_dir'].'/amavisd.conf', 0750); + chgrp($conf['amavis']['config_dir'].'/amavisd.conf', 'amavis'); + } // Adding the amavisd commands to the postfix configuration diff --git a/install/install.php b/install/install.php index 14c981522672224b3b80125333f6dbd42b9508b0..1e0899f02b9a7bcf92be75c203edfe6ea79e1e70 100644 --- a/install/install.php +++ b/install/install.php @@ -246,41 +246,99 @@ $conf['services']['firewall'] = false; $conf['services']['proxy'] = false; $conf['services']['xmpp'] = false; -if($install_mode == 'standard') { +//** Get Server ID +// $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); +// Server ID is an autoInc value of the mysql database now +if($install_mode == 'expert' && strtolower($inst->simple_query('Shall this server join an existing ISPConfig multiserver setup', array('y', 'n'), 'n','join_multiserver_setup')) == 'y') { + $conf['mysql']['master_slave_setup'] = 'y'; + + //** Get MySQL root credentials + $finished = false; + do { + $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); + $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); + $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); + $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); + $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); + + //* Initialize the MySQL server connection + if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { + $conf['mysql']['master_host'] = $tmp_mysql_server_host; + $conf['mysql']['master_port'] = $tmp_mysql_server_port; + $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; + $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; + $conf['mysql']['master_database'] = $tmp_mysql_server_database; + $finished = true; + } else { + swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); + } + } while ($finished == false); + unset($finished); + // initialize the connection to the master database + $inst->dbmaster = new db(); + if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); + $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); + $inst->dbmaster->setDBName($conf['mysql']["master_database"]); + +} else { + // the master DB is the same then the slave DB $inst->dbmaster = $inst->db; - - //* Create the MySQL database - $inst->configure_database(); +} + +//* Create the mysql database +$inst->configure_database(); - //* Insert the Server record into the database - $inst->add_database_server_record(); +//* Check for Web-Server +if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) { + $conf['apache']['installed'] = $inst->force_configure_app('Apache', ($install_mode == 'expert')); + $conf['nginx']['installed'] = $inst->force_configure_app('nginx', ($install_mode == 'expert')); +} + +//* Configure Webserver - Apache or nginx +if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { + $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); + if($http_server_to_use == 'apache'){ + $conf['nginx']['installed'] = false; + $conf['services']['file'] = true; + } else { + $conf['apache']['installed'] = false; + } +} + +//* Insert the Server record into the database +if($install_mode == 'expert') { + swriteln('Adding ISPConfig server record to database.'); + swriteln(''); +} +$inst->add_database_server_record(); + +if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Mail', array('y', 'n') , 'y','configure_mail') ) == 'y') { //* Configure Postgrey - $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey', false); + $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey', ($install_mode == 'expert')); if($force) swriteln('Configuring Postgrey'); //* Configure Postfix - $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix', false); + $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix', ($install_mode == 'expert')); if($force) { swriteln('Configuring Postfix'); - $inst->configure_postfix(); $conf['services']['mail'] = true; + $inst->configure_postfix(); } if($conf['services']['mail']) { - //* Configure Mailman - $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman', false); + $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman', ($install_mode == 'expert')); if($force) { swriteln('Configuring Mailman'); $inst->configure_mailman(); - } + } //* Check for Dovecot and Courier if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { - $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', false); - $conf['courier']['installed'] = $inst->force_configure_app('Courier', false); + $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot', ($install_mode == 'expert')); + $conf['courier']['installed'] = $inst->force_configure_app('Courier', ($install_mode == 'expert')); } //* Configure Mailserver - Dovecot or Courier if($conf['dovecot']['installed'] && $conf['courier']['installed']) { @@ -307,44 +365,58 @@ if($install_mode == 'standard') { } //* Configure Spamasassin - $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin', false); + $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin', ($install_mode == 'expert')); if($force) { swriteln('Configuring Spamassassin'); $inst->configure_spamassassin(); } - + //* Configure Amavis - $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd', false); + $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd', ($install_mode == 'expert')); if($force) { swriteln('Configuring Amavisd'); $inst->configure_amavis(); } //* Configure Getmail - $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail', false); + $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail', ($install_mode == 'expert')); if($force) { swriteln('Configuring Getmail'); $inst->configure_getmail(); } + } else { + swriteln('[ERROR] Postfix not installed - skipping Mail'); + } +} + +//* Configure Jailkit +$force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit', ($install_mode == 'expert')); +if($force) { + swriteln('Configuring Jailkit'); + $inst->configure_jailkit(); +} - } else swriteln('[ERROR] Postfix not installed - skipping Mail'); +//* Configure Pureftpd +$force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd', ($install_mode == 'expert')); +if($force) { + swriteln('Configuring Pureftpd'); + $inst->configure_pureftpd(); +} +//** Configure DNS +if($install_mode == 'standard' || strtolower($inst->simple_query('Configure DNS Server', array('y', 'n'), 'y','configure_dns')) == 'y') { //* Check for DNS -// if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { - if(!$conf['bind']['installed'] && !$conf['mydns']['installed']) { -// $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS', false); - $conf['bind']['installed'] = $inst->force_configure_app('BIND', false); - $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS', false); + if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { + if($install_mode == 'expert') $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS', ($install_mode == 'expert')); + $conf['bind']['installed'] = $inst->force_configure_app('BIND', ($install_mode == 'expert')); + $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS', ($install_mode == 'expert')); } //* Configure PowerDNS -/* - if($conf['powerdns']['installed']) { + if($install_mode == 'expert' && $conf['powerdns']['installed']) { swriteln('Configuring PowerDNS'); $inst->configure_powerdns(); $conf['services']['dns'] = true; } -*/ - //* Configure Bind if($conf['bind']['installed']) { swriteln('Configuring BIND'); @@ -361,36 +433,9 @@ if($install_mode == 'standard') { $conf['services']['dns'] = true; } - //* Configure Jailkit - $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit', false); - if($force) { - swriteln('Configuring Jailkit'); - $inst->configure_jailkit(); - } - - //* Configure Pureftpd - $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd', false); - if($force) { - swriteln('Configuring Pureftpd'); - $inst->configure_pureftpd(); - } - - //* Check for Web-Server - if(!$conf['apache']['installed'] && !$conf['nginx']['installed']) { - $conf['apache']['installed'] = $inst->force_configure_app('Apache', false); - $conf['nginx']['installed'] = $inst->force_configure_app('nginx', false); - } - - //* Configure Webserver - Apache or nginx - if($conf['apache']['installed'] && $conf['nginx']['installed']) { - $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); - if($http_server_to_use == 'apache'){ - $conf['nginx']['installed'] = false; - } else { - $conf['apache']['installed'] = false; - } - } +} +if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Web Server', array('y', 'n'), 'y','configure_webserver')) == 'y') { //* Configure Apache if($conf['apache']['installed']){ swriteln('Configuring Apache'); @@ -398,41 +443,42 @@ if($install_mode == 'standard') { $conf['services']['web'] = true; $conf['services']['file'] = true; //* Configure Vlogger - $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger', false); + $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger', ($install_mode == 'expert')); if($force) { swriteln('Configuring vlogger'); $inst->configure_vlogger(); } //* Configure squid /* - $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); + $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid', ($install_mode == 'expert')); if($force) { swriteln('Configuring Squid'); $inst->configure_squid(); $conf['services']['proxy'] = true; + if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); } */ } - //* Configure nginx if($conf['nginx']['installed']){ swriteln('Configuring nginx'); $inst->configure_nginx(); $conf['services']['web'] = true; } +} - //* Configure XMPP - $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server', false); - if($force) { - swriteln('Configuring Metronome XMPP Server'); - $inst->configure_xmpp(); - $conf['services']['xmpp'] = true; - } +//* Configure OpenVZ +$force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', ($install_mode == 'expert')); +if($force) { + $conf['services']['vserver'] = true; + swriteln('Configuring OpenVZ'); +} +if($install_mode == 'standard' || strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { //* Check for Firewall if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { - $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall', false); - $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall', false); + $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall', ($install_mode == 'expert')); + $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall', ($install_mode == 'expert')); } //* Configure Firewall - Ubuntu or Bastille if($conf['ufw']['installed'] && $conf['firewall']['installed']) { @@ -456,29 +502,49 @@ if($install_mode == 'standard') { $conf['services']['firewall'] = true; $conf['bastille']['installed'] = true; } +} - //* Configure Fail2ban - $force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', false); - if($force) { - swriteln('Configuring Fail2ban'); - $inst->configure_fail2ban(); - } +//* Configure XMPP +$force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server', ($install_mode == 'expert')); +if($force) { + swriteln('Configuring Metronome XMPP Server'); + $inst->configure_xmpp(); + $conf['services']['xmpp'] = true; +} - //* Configure OpenVZ - $force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ', false); - if($force) { - $conf['services']['vserver'] = true; - swriteln('Configuring OpenVZ'); - } +//* Configure Fail2ban +$force = @($conf['fail2ban']['installed']) ? true : $inst->force_configure_app('Fail2ban', ($install_mode == 'expert')); +if($force) { + swriteln('Configuring Fail2ban'); + $inst->configure_fail2ban(); +} +if($conf['services']['web'] == true) { //** Configure apps vhost swriteln('Configuring Apps vhost'); $inst->configure_apps_vhost(); +} - //* Configure ISPConfig +//** Configure ISPConfig :-) +$install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y'; +if($install_mode == 'standard' || strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') { swriteln('Installing ISPConfig'); - //** Customize the port ISPConfig runs on + //** We want to check if the server is a module or cgi based php enabled server + //** TODO: Don't always ask for this somehow ? + /* + $fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no'); + + if($fast_cgi == 'yes') { + $alias = $inst->free_query('Script Alias', '/php/'); + $path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin'); + $conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path); + } else { + $conf['apache']['vhost_cgi_alias'] = ""; + } + */ + + //** Customise the port ISPConfig runs on $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); if($conf['interface_password'] != 'admin') { @@ -499,398 +565,58 @@ if($install_mode == 'standard') { if(strtolower($inst->simple_query('Do you want a secure (SSL) connection to the ISPConfig web interface', array('y', 'n'), 'y','ispconfig_use_ssl')) == 'y') { $inst->make_ispconfig_ssl_cert(); } + $inst->install_ispconfig_interface = true; - $inst->install_ispconfig(); - - //* Configure DBServer - swriteln('Configuring DBServer'); - $inst->configure_dbserver(); - - //* Configure ISPConfig - if($conf['cron']['installed']) { - swriteln('Installing ISPConfig crontab'); - $inst->install_crontab(); - } else swriteln('[ERROR] Cron not found'); - - swriteln('Detect IP addresses'); - $inst->detect_ips(); - - swriteln('Restarting services ...'); - if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1'); - if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); - if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); - if($conf['amavis']['installed'] == true && $conf['amavis']['init_script'] != '') system($inst->getinitcommand($conf['amavis']['init_script'], 'restart')); - if($conf['clamav']['installed'] == true && $conf['clamav']['init_script'] != '') system($inst->getinitcommand($conf['clamav']['init_script'], 'restart')); - if($conf['courier']['installed'] == true){ - if($conf['courier']['courier-authdaemon'] != '') system($inst->getinitcommand($conf['courier']['courier-authdaemon'], 'restart')); - if($conf['courier']['courier-imap'] != '') system($inst->getinitcommand($conf['courier']['courier-imap'], 'restart')); - if($conf['courier']['courier-imap-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-imap-ssl'], 'restart')); - if($conf['courier']['courier-pop'] != '') system($inst->getinitcommand($conf['courier']['courier-pop'], 'restart')); - if($conf['courier']['courier-pop-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-pop-ssl'], 'restart')); - } - if($conf['dovecot']['installed'] == true && $conf['dovecot']['init_script'] != '') system($inst->getinitcommand($conf['dovecot']['init_script'], 'restart')); - if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &'); - if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($inst->getinitcommand($conf['apache']['init_script'], 'restart')); - //* Reload is enough for nginx - if($conf['nginx']['installed'] == true){ - if($conf['nginx']['php_fpm_init_script'] != '') system($inst->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload')); - if($conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'reload')); - } - if($conf['pureftpd']['installed'] == true && $conf['pureftpd']['init_script'] != '') system($inst->getinitcommand($conf['pureftpd']['init_script'], 'restart')); - if($conf['mydns']['installed'] == true && $conf['mydns']['init_script'] != '') system($inst->getinitcommand($conf['mydns']['init_script'], 'restart').' &> /dev/null'); - if($conf['powerdns']['installed'] == true && $conf['powerdns']['init_script'] != '') system($inst->getinitcommand($conf['powerdns']['init_script'], 'restart').' &> /dev/null'); - if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); - //if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); - if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); - if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); - if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); - -} else { //* expert mode - - //** Get Server ID - // $conf['server_id'] = $inst->free_query('Unique Numeric ID of the server','1'); - // Server ID is an autoInc value of the mysql database now - if(strtolower($inst->simple_query('Shall this server join an existing ISPConfig multiserver setup', array('y', 'n'), 'n','join_multiserver_setup')) == 'y') { - $conf['mysql']['master_slave_setup'] = 'y'; - - //** Get MySQL root credentials - $finished = false; - do { - $tmp_mysql_server_host = $inst->free_query('MySQL master server hostname', $conf['mysql']['master_host'],'mysql_master_hostname'); - $tmp_mysql_server_port = $inst->free_query('MySQL master server port', $conf['mysql']['master_port'],'mysql_master_port'); - $tmp_mysql_server_admin_user = $inst->free_query('MySQL master server root username', $conf['mysql']['master_admin_user'],'mysql_master_root_user'); - $tmp_mysql_server_admin_password = $inst->free_query('MySQL master server root password', $conf['mysql']['master_admin_password'],'mysql_master_root_password'); - $tmp_mysql_server_database = $inst->free_query('MySQL master server database name', $conf['mysql']['master_database'],'mysql_master_database'); - - //* Initialize the MySQL server connection - if(@mysqli_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password, $tmp_mysql_server_database, (int)$tmp_mysql_server_port)) { - $conf['mysql']['master_host'] = $tmp_mysql_server_host; - $conf['mysql']['master_port'] = $tmp_mysql_server_port; - $conf['mysql']['master_admin_user'] = $tmp_mysql_server_admin_user; - $conf['mysql']['master_admin_password'] = $tmp_mysql_server_admin_password; - $conf['mysql']['master_database'] = $tmp_mysql_server_database; - $finished = true; - } else { - swriteln($inst->lng('Unable to connect to mysql server').' '.mysqli_connect_error()); - } - } while ($finished == false); - unset($finished); - - // initialize the connection to the master database - $inst->dbmaster = new db(); - if($inst->dbmaster->linkId) $inst->dbmaster->closeConn(); - $inst->dbmaster->setDBData($conf['mysql']["master_host"], $conf['mysql']["master_admin_user"], $conf['mysql']["master_admin_password"]); - $inst->dbmaster->setDBName($conf['mysql']["master_database"]); - - } else { - // the master DB is the same then the slave DB - $inst->dbmaster = $inst->db; - } - - //* Create the mysql database - $inst->configure_database(); - - //* Check for Web-Server - if($conf['apache']['installed'] != true && $conf['nginx']['installed'] != true) { - $conf['apache']['installed'] = $inst->force_configure_app('Apache'); - $conf['nginx']['installed'] = $inst->force_configure_app('nginx'); - } - //* Configure Webserver - Apache or nginx - if($conf['apache']['installed'] == true && $conf['nginx']['installed'] == true) { - $http_server_to_use = $inst->simple_query('Apache and nginx detected. Select server to use for ISPConfig:', array('apache', 'nginx'), 'apache','http_server'); - if($http_server_to_use == 'apache'){ - $conf['nginx']['installed'] = false; - $conf['services']['file'] = true; - } else { - $conf['apache']['installed'] = false; - } - } - - //* Insert the Server record into the database - swriteln('Adding ISPConfig server record to database.'); - swriteln(''); - $inst->add_database_server_record(); - - if(strtolower($inst->simple_query('Configure Mail', array('y', 'n') , 'y','configure_mail') ) == 'y') { - - $conf['services']['mail'] = true; - - //* Configure Postgrey - $force = @($conf['postgrey']['installed']) ? true : $inst->force_configure_app('Postgrey'); - if($force) swriteln('Configuring Postgrey'); - - //* Configure Postfix - $force = @($conf['postfix']['installed']) ? true : $inst->force_configure_app('Postfix'); - if($force) { - swriteln('Configuring Postfix'); - $inst->configure_postfix(); - } - - //* Configure Mailman - $force = @($conf['mailman']['installed']) ? true : $inst->force_configure_app('Mailman'); - if($force) { - swriteln('Configuring Mailman'); - $inst->configure_mailman(); - } - - //* Check for Dovecot and Courier - if(!$conf['dovecot']['installed'] && !$conf['courier']['installed']) { - $conf['dovecot']['installed'] = $inst->force_configure_app('Dovecot'); - $conf['courier']['installed'] = $inst->force_configure_app('Courier'); - } - //* Configure Mailserver - Dovecot or Courier - if($conf['dovecot']['installed'] && $conf['courier']['installed']) { - $mail_server_to_use = $inst->simple_query('Dovecot and Courier detected. Select server to use with ISPConfig:', array('dovecot', 'courier'), 'dovecot','mail_server'); - if($mail_server_to_use == 'dovecot'){ - $conf['courier']['installed'] = false; - } else { - $conf['dovecot']['installed'] = false; - } - } - //* Configure Dovecot - if($conf['dovecot']['installed']) { - swriteln('Configuring Dovecot'); - $inst->configure_dovecot(); - } - //* Configure Courier - if($conf['courier']['installed']) { - swriteln('Configuring Courier'); - $inst->configure_courier(); - swriteln('Configuring SASL'); - $inst->configure_saslauthd(); - swriteln('Configuring PAM'); - $inst->configure_pam(); - } - - //* Configure Spamasassin - $force = @($conf['spamassassin']['installed']) ? true : $inst->force_configure_app('Spamassassin'); - if($force) { - swriteln('Configuring Spamassassin'); - $inst->configure_spamassassin(); - } - - //* Configure Amavis - $force = @($conf['amavis']['installed']) ? true : $inst->force_configure_app('Amavisd'); - if($force) { - swriteln('Configuring Amavisd'); - $inst->configure_amavis(); - } - - //* Configure Getmail - $force = @($conf['getmail']['installed']) ? true : $inst->force_configure_app('Getmail'); - if($force) { - swriteln('Configuring Getmail'); - $inst->configure_getmail(); - } - - if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); - if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); - if($conf['amavis']['installed'] == true && $conf['amavis']['init_script'] != '') system($inst->getinitcommand($conf['amavis']['init_script'], 'restart')); - if($conf['clamav']['installed'] == true && $conf['clamav']['init_script'] != '') system($inst->getinitcommand($conf['clamav']['init_script'], 'restart')); - if($conf['courier']['installed'] == true){ - if($conf['courier']['courier-authdaemon'] != '') system($inst->getinitcommand($conf['courier']['courier-authdaemon'], 'restart')); - if($conf['courier']['courier-imap'] != '') system($inst->getinitcommand($conf['courier']['courier-imap'], 'restart')); - if($conf['courier']['courier-imap-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-imap-ssl'], 'restart')); - if($conf['courier']['courier-pop'] != '') system($inst->getinitcommand($conf['courier']['courier-pop'], 'restart')); - if($conf['courier']['courier-pop-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-pop-ssl'], 'restart')); - } - if($conf['dovecot']['installed'] == true && $conf['dovecot']['init_script'] != '') system($inst->getinitcommand($conf['dovecot']['init_script'], 'restart')); - if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &'); - } - - //* Configure Jailkit - $force = @($conf['jailkit']['installed']) ? true : $inst->force_configure_app('Jailkit'); - if($force) { - swriteln('Configuring Jailkit'); - $inst->configure_jailkit(); - } - - //* Configure Pureftpd - $force = @($conf['pureftpd']['installed']) ? true : $inst->force_configure_app('pureftpd'); - if($force) { - swriteln('Configuring Pureftpd'); - $inst->configure_pureftpd(); - } - - //** Configure DNS - if(strtolower($inst->simple_query('Configure DNS Server', array('y', 'n'), 'y','configure_dns')) == 'y') { - $conf['services']['dns'] = true; - - //* Check for DNS - if(!$conf['powerdns']['installed'] && !$conf['bind']['installed'] && !$conf['mydns']['installed']) { - $conf['powerdns']['installed'] = $inst->force_configure_app('PowerDNS'); - $conf['bind']['installed'] = $inst->force_configure_app('BIND'); - $conf['mydns']['installed'] = $inst->force_configure_app('MyDNS'); - } - //* Configure PowerDNS - if($conf['powerdns']['installed']) { - swriteln('Configuring PowerDNS'); - $inst->configure_powerdns(); - $conf['services']['dns'] = true; - } - //* Configure Bind - if($conf['bind']['installed']) { - swriteln('Configuring BIND'); - $inst->configure_bind(); - $conf['services']['dns'] = true; - if(!is_installed('haveged')) { - swriteln("[INFO] haveged not detected - DNSSEC can fail"); - } - } - //* Configure MyDNS - if($conf['mydns']['installed']) { - swriteln('Configuring MyDNS'); - $inst->configure_mydns(); - $conf['services']['dns'] = true; - } - - } - - if(strtolower($inst->simple_query('Configure Web Server', array('y', 'n'), 'y','configure_webserver')) == 'y') { - $conf['services']['web'] = true; - - //* Configure Apache - if($conf['apache']['installed']){ - swriteln('Configuring Apache'); - $inst->configure_apache(); - $conf['services']['file'] = true; - //* Configure Vlogger - $force = @($conf['vlogger']['installed']) ? true : $inst->force_configure_app('vlogger'); - if($force) { - swriteln('Configuring vlogger'); - $inst->configure_vlogger(); - } - //* Configure squid -/* - $force = @($conf['squid']['installed']) ? true : $inst->force_configure_app('squid'); - if($force) { - swriteln('Configuring Squid'); - $inst->configure_squid(); - $conf['services']['proxy'] = true; - if($conf['squid']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['squid']['init_script']))system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); - } -*/ - } - //* Configure nginx - if($conf['nginx']['installed']){ - swriteln('Configuring nginx'); - $inst->configure_nginx(); - } - } - - //* Configure OpenVZ - $force = @($conf['openvz']['installed']) ? true : $inst->force_configure_app('OpenVZ'); - if($force) { - $conf['services']['vserver'] = true; - swriteln('Configuring OpenVZ'); - } - - if(strtolower($inst->simple_query('Configure Firewall Server', array('y', 'n'), 'y','configure_firewall')) == 'y') { - //* Check for Firewall - if(!$conf['ufw']['installed'] && !$conf['firewall']['installed']) { - $conf['ufw']['installed'] = $inst->force_configure_app('Ubuntu Firewall'); - $conf['firewall']['installed'] = $inst->force_configure_app('Bastille Firewall'); - } - //* Configure Firewall - Ubuntu or Bastille - if($conf['ufw']['installed'] && $conf['firewall']['installed']) { - $firewall_to_use = $inst->simple_query('Ubuntu and Bastille Firewall detected. Select firewall to use with ISPConfig:', array('bastille', 'ubuntu'), 'bastille','firewall_server'); - if($firewall_to_use == 'bastille'){ - $conf['ufw']['installed'] = false; - } else { - $conf['firewall']['installed'] = false; - } - } - //* Configure Ubuntu Firewall - if($conf['ufw']['installed']){ - swriteln('Configuring Ubuntu Firewall'); - $inst->configure_ufw_firewall(); - $conf['services']['firewall'] = true; - } - //* Configure Bastille Firewall - if($conf['firewall']['installed']){ - swriteln('Configuring Bastille Firewall'); - $inst->configure_bastille_firewall(); - $conf['services']['firewall'] = true; - } - } - - //* Configure XMPP - $force = @($conf['xmpp']['installed']) ? true : $inst->force_configure_app('Metronome XMPP Server'); - if($force) { - swriteln('Configuring Metronome XMPP Server'); - $inst->configure_xmpp(); - $conf['services']['xmpp'] = true; - } - - //** Configure ISPConfig :-) - $install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y'; - if(strtolower($inst->simple_query('Install ISPConfig Web Interface', array('y', 'n'), $install_ispconfig_interface_default,'install_ispconfig_web_interface')) == 'y') { - swriteln('Installing ISPConfig'); - - //** We want to check if the server is a module or cgi based php enabled server - //** TODO: Don't always ask for this somehow ? - /* - $fast_cgi = $inst->simple_query('CGI PHP Enabled Server?', array('yes','no'),'no'); - - if($fast_cgi == 'yes') { - $alias = $inst->free_query('Script Alias', '/php/'); - $path = $inst->free_query('Script Alias Path', '/path/to/cgi/bin'); - $conf['apache']['vhost_cgi_alias'] = sprintf('ScriptAlias %s %s', $alias, $path); - } else { - $conf['apache']['vhost_cgi_alias'] = ""; - } - */ - - //** Customise the port ISPConfig runs on - $ispconfig_vhost_port = $inst->free_query('ISPConfig Port', '8080','ispconfig_port'); - $conf['interface_password'] = $inst->free_query('Admin password', 'admin'); - if($conf['interface_password'] != 'admin') { - $check = false; - do { - unset($temp_password); - $temp_password = $inst->free_query('Re-enter admin password', ''); - $check = @($temp_password == $conf['interface_password'])?true:false; - if(!$check) swriteln('Passwords do not match.'); - } while (!$check); - } - unset($check); - unset($temp_password); - if($conf['apache']['installed'] == true) $conf['apache']['vhost_port'] = $ispconfig_vhost_port; - if($conf['nginx']['installed'] == true) $conf['nginx']['vhost_port'] = $ispconfig_vhost_port; - unset($ispconfig_vhost_port); - - if(strtolower($inst->simple_query('Enable SSL for the ISPConfig web interface', array('y', 'n'), 'y','ispconfig_use_ssl')) == 'y') { - $inst->make_ispconfig_ssl_cert(); - } - - $inst->install_ispconfig_interface = true; - - } else { - $inst->install_ispconfig_interface = false; - } +} else { + $inst->install_ispconfig_interface = false; +} - $inst->install_ispconfig(); +$inst->install_ispconfig(); - //* Configure DBServer - swriteln('Configuring DBServer'); - $inst->configure_dbserver(); +//* Configure DBServer +swriteln('Configuring DBServer'); +$inst->configure_dbserver(); - //* Configure ISPConfig +//* Configure ISPConfig +swriteln('Installing ISPConfig crontab'); +if($conf['cron']['installed']) { swriteln('Installing ISPConfig crontab'); $inst->install_crontab(); - if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($inst->getinitcommand($conf['apache']['init_script'], 'restart')); - //* Reload is enough for nginx - if($conf['nginx']['installed'] == true){ - if($conf['nginx']['php_fpm_init_script'] != '') system($inst->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload')); - if($conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'reload')); - } - - swriteln('Detect IP addresses'); - $inst->detect_ips(); - - +} else swriteln('[ERROR] Cron not found'); + +swriteln('Detect IP addresses'); +$inst->detect_ips(); + +swriteln('Restarting services ...'); +if($conf['mysql']['installed'] == true && $conf['mysql']['init_script'] != '') system($inst->getinitcommand($conf['mysql']['init_script'], 'restart').' >/dev/null 2>&1'); +if($conf['postfix']['installed'] == true && $conf['postfix']['init_script'] != '') system($inst->getinitcommand($conf['postfix']['init_script'], 'restart')); +if($conf['saslauthd']['installed'] == true && $conf['saslauthd']['init_script'] != '') system($inst->getinitcommand($conf['saslauthd']['init_script'], 'restart')); +if($conf['amavis']['installed'] == true && $conf['amavis']['init_script'] != '') system($inst->getinitcommand($conf['amavis']['init_script'], 'restart')); +if($conf['clamav']['installed'] == true && $conf['clamav']['init_script'] != '') system($inst->getinitcommand($conf['clamav']['init_script'], 'restart')); +if($conf['courier']['installed'] == true){ + if($conf['courier']['courier-authdaemon'] != '') system($inst->getinitcommand($conf['courier']['courier-authdaemon'], 'restart')); + if($conf['courier']['courier-imap'] != '') system($inst->getinitcommand($conf['courier']['courier-imap'], 'restart')); + if($conf['courier']['courier-imap-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-imap-ssl'], 'restart')); + if($conf['courier']['courier-pop'] != '') system($inst->getinitcommand($conf['courier']['courier-pop'], 'restart')); + if($conf['courier']['courier-pop-ssl'] != '') system($inst->getinitcommand($conf['courier']['courier-pop-ssl'], 'restart')); +} +if($conf['dovecot']['installed'] == true && $conf['dovecot']['init_script'] != '') system($inst->getinitcommand($conf['dovecot']['init_script'], 'restart')); +if($conf['mailman']['installed'] == true && $conf['mailman']['init_script'] != '') system('nohup '.$inst->getinitcommand($conf['mailman']['init_script'], 'restart').' >/dev/null 2>&1 &'); +if($conf['apache']['installed'] == true && $conf['apache']['init_script'] != '') system($inst->getinitcommand($conf['apache']['init_script'], 'restart')); +//* Reload is enough for nginx +if($conf['nginx']['installed'] == true){ + if($conf['nginx']['php_fpm_init_script'] != '') system($inst->getinitcommand($conf['nginx']['php_fpm_init_script'], 'reload')); + if($conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'reload')); +} +if($conf['pureftpd']['installed'] == true && $conf['pureftpd']['init_script'] != '') system($inst->getinitcommand($conf['pureftpd']['init_script'], 'restart')); +if($conf['mydns']['installed'] == true && $conf['mydns']['init_script'] != '') system($inst->getinitcommand($conf['mydns']['init_script'], 'restart').' &> /dev/null'); +if($conf['powerdns']['installed'] == true && $conf['powerdns']['init_script'] != '') system($inst->getinitcommand($conf['powerdns']['init_script'], 'restart').' &> /dev/null'); +if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '') system($inst->getinitcommand($conf['bind']['init_script'], 'restart').' &> /dev/null'); +//if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null'); +if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '') system($inst->getinitcommand($conf['nginx']['init_script'], 'restart').' &> /dev/null'); +if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '') system($inst->getinitcommand($conf['ufw']['init_script'], 'restart').' &> /dev/null'); +if($conf['xmpp']['installed'] == true && $conf['xmpp']['init_script'] != '') system($inst->getinitcommand($conf['xmpp']['init_script'], 'restart').' &> /dev/null'); -} //* << $install_mode / 'Standard' or Genius $inst->create_mount_script(); diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index f67026120370f3c1f95c3865ca6f36d20e0db655..c19736ad90faed03a61b3ba82ec26389c67f5a88 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -296,7 +296,7 @@ function get_distname() { } elseif(stristr($content, 'CentOS Linux release 7.2')) { $distname = 'CentOS'; $distver = 'Unknown'; - $distid = 'centos70'; + $distid = 'centos72'; $distconfid = 'centos72'; $distbaseid = 'fedora'; swriteln("Operating System: CentOS 7.2\n"); diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 49b0e3d0eabd3364cb97ebc8f03c7f3b5885aa4a..c437ea32bfcae8108fba5306aa7e675d6bde9356 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -171,14 +171,19 @@ class installer_base { if(is_installed('named') || is_installed('bind') || is_installed('bind9')) $conf['bind']['installed'] = true; if(is_installed('squid')) $conf['squid']['installed'] = true; if(is_installed('nginx')) $conf['nginx']['installed'] = true; - if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true; - if(is_installed('iptables') && is_installed('bastille-netfilter')) $conf['firewall']['installed'] = true; + if(is_installed('iptables') && is_installed('ufw')) { + $conf['ufw']['installed'] = true; + } elseif(is_installed('iptables')) { + $conf['firewall']['installed'] = true; + } if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true; if(is_installed('vzctl')) $conf['openvz']['installed'] = true; if(is_installed('metronome') && is_installed('metronomectl')) $conf['xmpp']['installed'] = true; if(is_installed('spamassassin')) $conf['spamassassin']['installed'] = true; - if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; - if(is_installed('cron')) $conf['cron']['installed'] = true; + // if(is_installed('vlogger')) $conf['vlogger']['installed'] = true; + // ISPConfig ships with vlogger, so it is always installed. + $conf['vlogger']['installed'] = true; + if(is_installed('cron') || is_installed('anacron')) $conf['cron']['installed'] = true; if ($conf['services']['web'] && (($conf['apache']['installed'] && is_file($conf['apache']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")) || ($conf['nginx']['installed'] && is_file($conf['nginx']["vhost_conf_enabled_dir"]."/000-ispconfig.vhost")))) $this->ispconfig_interface_installed = true; } @@ -1686,7 +1691,7 @@ Email Address []: if(!@is_dir($conf['ispconfig_log_dir'].'/httpd')) mkdir($conf['ispconfig_log_dir'].'/httpd', 0755, true); if(is_file('/etc/suphp/suphp.conf')) { - replaceLine('/etc/suphp/suphp.conf', 'php=php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0); + replaceLine('/etc/suphp/suphp.conf', 'php="php:/usr/bin', 'x-httpd-suphp="php:/usr/bin/php-cgi"', 0); //replaceLine('/etc/suphp/suphp.conf','docroot=','docroot=/var/clients',0); replaceLine('/etc/suphp/suphp.conf', 'umask=0077', 'umask=0022', 0); } diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f0a3df83f3814a9bb6e18f4e120d7a8fc3e9c589 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -0,0 +1,15 @@ +ALTER TABLE `client` CHANGE `web_servers` `web_servers` TEXT NULL DEFAULT NULL; +ALTER TABLE `client` CHANGE `mail_servers` `mail_servers` TEXT NULL DEFAULT NULL; +ALTER TABLE `client` CHANGE `xmpp_servers` `xmpp_servers` TEXT NULL DEFAULT NULL; +ALTER TABLE `client` CHANGE `db_servers` `db_servers` TEXT NULL DEFAULT NULL; +ALTER TABLE `client` CHANGE `dns_servers` `dns_servers` TEXT NULL DEFAULT NULL; +UPDATE client SET web_servers = default_webserver WHERE (web_servers = '' OR web_servers IS NULL); +UPDATE client SET mail_servers = default_mailserver WHERE (mail_servers = '' OR mail_servers IS NULL); +UPDATE client SET xmpp_servers = default_xmppserver WHERE (xmpp_servers = '' OR xmpp_servers IS NULL); +UPDATE client SET db_servers = default_dbserver WHERE (db_servers = '' OR db_servers IS NULL); +UPDATE client SET dns_servers = default_dnsserver WHERE (dns_servers = '' OR dns_servers IS NULL); +ALTER TABLE `client_template` ADD `default_slave_dnsserver` INT NOT NULL DEFAULT '0' AFTER `limit_dns_slave_zone`; +ALTER TABLE `client_template` ADD `mail_servers` TEXT NULL DEFAULT NULL AFTER `template_type`; +ALTER TABLE `client_template` ADD `web_servers` TEXT NULL DEFAULT NULL AFTER `limit_xmpp_httparchive`; +ALTER TABLE `client_template` ADD `dns_servers` TEXT NULL DEFAULT NULL AFTER `limit_aps`; +ALTER TABLE `client_template` ADD `db_servers` TEXT NULL DEFAULT NULL AFTER `limit_dns_record`; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index a14a0d6b1b3983a71abbdeb8c624fc288012c96f..eaf060a8a8f98ce2b94ba856175c51bef889c983 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -170,7 +170,7 @@ CREATE TABLE `client` ( `bank_account_swift` varchar(255) DEFAULT NULL, `paypal_email` varchar(255) DEFAULT NULL, `default_mailserver` int(11) unsigned NOT NULL DEFAULT '1', - `mail_servers` blob, + `mail_servers` text, `limit_maildomain` int(11) NOT NULL DEFAULT '-1', `limit_mailbox` int(11) NOT NULL DEFAULT '-1', `limit_mailalias` int(11) NOT NULL DEFAULT '-1', @@ -185,7 +185,7 @@ CREATE TABLE `client` ( `limit_spamfilter_user` int(11) NOT NULL DEFAULT '0', `limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0', `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', - `xmpp_servers` blob, + `xmpp_servers` text, `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', @@ -197,7 +197,7 @@ CREATE TABLE `client` ( `limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n', `limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n', `default_webserver` int(11) unsigned NOT NULL DEFAULT '1', - `web_servers` blob, + `web_servers` text, `limit_web_ip` text, `limit_web_domain` int(11) NOT NULL DEFAULT '-1', `limit_web_quota` int(11) NOT NULL DEFAULT '-1', @@ -222,13 +222,13 @@ CREATE TABLE `client` ( `limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n', `limit_aps` int(11) NOT NULL DEFAULT '-1', `default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1', - `db_servers` blob, + `db_servers` text, `limit_dns_zone` int(11) NOT NULL DEFAULT '-1', `default_slave_dnsserver` int(11) unsigned NOT NULL DEFAULT '1', `limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1', `limit_dns_record` int(11) NOT NULL DEFAULT '-1', `default_dbserver` int(11) NOT NULL DEFAULT '1', - `dns_servers` blob, + `dns_servers` text, `limit_database` int(11) NOT NULL DEFAULT '-1', `limit_database_user` int(11) NOT NULL DEFAULT '-1', `limit_database_quota` int(11) NOT NULL default '-1', @@ -301,6 +301,7 @@ CREATE TABLE `client_template` ( `sys_perm_other` varchar(5) default NULL, `template_name` varchar(64) NOT NULL DEFAULT '', `template_type` varchar(1) NOT NULL default 'm', + `mail_servers` text, `limit_maildomain` int(11) NOT NULL default '-1', `limit_mailbox` int(11) NOT NULL default '-1', `limit_mailalias` int(11) NOT NULL default '-1', @@ -315,7 +316,7 @@ CREATE TABLE `client_template` ( `limit_spamfilter_user` int(11) NOT NULL default '0', `limit_spamfilter_policy` int(11) NOT NULL default '0', `default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1', - `xmpp_servers` blob, + `xmpp_servers` text, `limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1', `limit_xmpp_user` int(11) NOT NULL DEFAULT '-1', `limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n', @@ -325,6 +326,7 @@ CREATE TABLE `client_template` ( `limit_xmpp_status` 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', + `web_servers` text, `limit_web_ip` text, `limit_web_domain` int(11) NOT NULL default '-1', `limit_web_quota` int(11) NOT NULL default '-1', @@ -348,9 +350,12 @@ CREATE TABLE `client_template` ( `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y', `limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n', `limit_aps` int(11) NOT NULL DEFAULT '-1', + `dns_servers` text, `limit_dns_zone` int(11) NOT NULL default '-1', + `default_slave_dnsserver` int(11) NOT NULL DEFAULT '0', `limit_dns_slave_zone` int(11) NOT NULL default '-1', `limit_dns_record` int(11) NOT NULL default '-1', + `db_servers` text, `limit_database` int(11) NOT NULL default '-1', `limit_database_user` int(11) NOT NULL DEFAULT '-1', `limit_database_quota` int(11) NOT NULL default '-1', @@ -2477,7 +2482,7 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`, -- Dumping data for table `sys_config` -- -INSERT INTO sys_config VALUES ('db','db_version','3.1b1'); +INSERT INTO sys_config VALUES ('db','db_version','3.1dev'); INSERT INTO sys_config VALUES ('interface','session_timeout','0'); SET FOREIGN_KEY_CHECKS = 1; diff --git a/install/tpl/config.inc.php.master b/install/tpl/config.inc.php.master index 2ba18f3ed37204e1132dce895b2a9777ab8aa682..02a7b2f65ccccde2db89cfcaac24e86307e88843 100644 --- a/install/tpl/config.inc.php.master +++ b/install/tpl/config.inc.php.master @@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision); //** Application define('ISPC_APP_TITLE', 'ISPConfig'); -define('ISPC_APP_VERSION', '3.1b1'); +define('ISPC_APP_VERSION', '3.1dev'); define('DEVSYSTEM', 0); diff --git a/install/tpl/helo_access.master b/install/tpl/helo_access.master index 796c3ed52abc04e4421ef2f970335cc258fd775f..41f182e276cd241cb902e5f30e40f708a701f18e 100644 --- a/install/tpl/helo_access.master +++ b/install/tpl/helo_access.master @@ -2,7 +2,7 @@ # be sure to list your own hostname(s), domain(s) and IP address(es) here # Reject others identifying with this machine's hostnames and IP addresses -/^{myhostname}$/ REJECT +#/^{myhostname}$/ REJECT #/^((smtp|mx|mail)\.domain1\.com$/ REJECT #/^mail\.domain2\.com$/ REJECT diff --git a/install/tpl/pureftpd_mysql.conf.master b/install/tpl/pureftpd_mysql.conf.master index 32d21594db6d1b43b067e216cf1c473af536fffa..484f1054c843555e273f9ac4d4141c43e2f40d13 100644 --- a/install/tpl/pureftpd_mysql.conf.master +++ b/install/tpl/pureftpd_mysql.conf.master @@ -59,12 +59,12 @@ MYSQLCrypt crypt # Query to execute in order to fetch the password -MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MYSQLGetPW SELECT password FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Query to execute in order to fetch the system user name or uid -MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : default UID - if set this overrides MYSQLGetUID @@ -74,7 +74,7 @@ MYSQLGetUID SELECT uid FROM ftp_user WHERE active = 'y' AND server_id = '{se # Query to execute in order to fetch the system user group or gid -MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : default GID - if set this overrides MYSQLGetGID @@ -84,34 +84,34 @@ MYSQLGetGID SELECT gid FROM ftp_user WHERE active = 'y' AND server_id = '{se # Query to execute in order to fetch the home directory -MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MYSQLGetDir SELECT dir FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : query to get the maximal number of files # Pure-FTPd must have been compiled with virtual quotas support. -MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MySQLGetQTAFS SELECT quota_files FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_files != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : query to get the maximal disk usage (virtual quotas) # The number should be in Megabytes. # Pure-FTPd must have been compiled with virtual quotas support. -MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MySQLGetQTASZ SELECT quota_size FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND quota_size != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : ratios. The server has to be compiled with ratio support. -MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) -MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MySQLGetRatioUL SELECT ul_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) +MySQLGetRatioDL SELECT dl_ratio FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_ratio != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Optional : bandwidth throttling. # The server has to be compiled with throttling support. # Values are in KB/s . -MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) -MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires > NOW()) +MySQLGetBandwidthUL SELECT ul_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND ul_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) +MySQLGetBandwidthDL SELECT dl_bandwidth FROM ftp_user WHERE active = 'y' AND server_id = '{server_id}' AND dl_bandwidth != '-1' AND username="\L" AND (expires IS NULL OR expires="0000-00-00 00:00:00" OR expires > NOW()) # Enable ~ expansion. NEVER ENABLE THIS BLINDLY UNLESS : # 1) You know what you are doing. diff --git a/interface/lib/classes/quota_lib.inc.php b/interface/lib/classes/quota_lib.inc.php index 0455dc98b219b7fb98b211d2cff97d248446cfb5..b6d224069f3c07d46cbdb82961c30f9d3b2cca66 100644 --- a/interface/lib/classes/quota_lib.inc.php +++ b/interface/lib/classes/quota_lib.inc.php @@ -312,13 +312,13 @@ class quota_lib { $databases[$i]['quota_raw'] = $databases[$i]['database_quota']; $databases[$i]['used_raw'] = $databases[$i]['used'] / 1024 / 1024; //* quota is stored as MB - calculated bytes - $databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used'] * 100 / $databases[$i]['database_quota']) : 0; + $databases[$i]['used_percentage'] = (($databases[$i]['database_quota'] > 0) && ($databases[$i]['used'] > 0)) ? round($databases[$i]['used_raw'] * 100 / $databases[$i]['database_quota']) : 0; if ($readable) { // colours $databases[$i]['display_colour'] = '#000000'; if($databases[$i]['database_quota'] > 0){ - $used_ratio = $databases[$i]['used']/$databases[$i]['database_quota']; + $used_ratio = $databases[$i]['used'] / $databases[$i]['database_quota']; } else { $used_ratio = 0; } diff --git a/interface/lib/classes/session.inc.php b/interface/lib/classes/session.inc.php index bef2a1037838b2c3253c771b3b5d280b21ad49b9..f4a90beda9ae46276598d9381e0206dcf0e3ac4c 100644 --- a/interface/lib/classes/session.inc.php +++ b/interface/lib/classes/session.inc.php @@ -93,8 +93,8 @@ class session { if (@$this->session_array['session_id'] == '') { - $sql = "REPLACE INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES (?,NOW(),NOW(),'$session_data',?)"; - $this->db->query($sql, $session_id, ($this->permanent ? 'y' : 'n')); + $sql = "REPLACE INTO sys_session (session_id,date_created,last_updated,session_data,permanent) VALUES (?,NOW(),NOW(),?,?)"; + $this->db->query($sql, $session_id, $session_data, ($this->permanent ? 'y' : 'n')); } else { $sql = "UPDATE sys_session SET last_updated = NOW(), session_data = ?" . ($this->permanent ? ", `permanent` = 'y'" : "") . " WHERE session_id = ?"; diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index 1376d7ded94c90f13204dff3fce85346d1e6e4e0..503bd24eb83db64554010944519b9c79898b6bb1 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -235,6 +235,24 @@ class tform extends tform_base { return $diffrec; } + + /** + * Generate HTML for DATE fields. + * + * @access private + * @param string $form_element Name of the form element. + * @param string $default_value Selected value for fields. + * @return string HTML + */ + function _getDateHTML($form_element, $default_value) + { + $_date = ($default_value && $default_value != '0000-00-00' ? strtotime($default_value) : false); + $_showdate = ($_date === false) ? false : true; + + $tmp_dt = strtr($this->dateformat,array('d' => 'dd', 'm' => 'mm', 'Y' => 'yyyy', 'y' => 'yy')); + + return '<input type="text" class="form-control" name="' . $form_element . '" value="' . ($_showdate ? date($this->dateformat, $_date) : '') . '" data-input-element="date" data-date-format="' . $tmp_dt . '" />'; + } /** diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 5adbdf7d685f6e0304786c3d1f7b12879600bb05..0c9cda5f5135eeca0300f8327b8e24a41177694f 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -562,6 +562,18 @@ class tform_base { $new_record[$key] = $this->_getDateTimeHTML($key, $dt_value, $display_seconds); break; + case 'DATE': + if (strtotime($val) !== false) { + $dt_value = $val; + } elseif ( isset($field['default']) && (strtotime($field['default']) !== false) ) { + $dt_value = $field['default']; + } else { + $dt_value = 0; + } + + $new_record[$key] = $this->_getDateHTML($key, $dt_value); + break; + default: if(isset($record[$key])) { $new_record[$key] = htmlspecialchars($record[$key]); @@ -672,6 +684,12 @@ class tform_base { $new_record[$key] = $this->_getDateTimeHTML($key, $dt_value, $display_seconds); break; + + case 'DATE': + $dt_value = (isset($field['default'])) ? $field['default'] : 0; + + $new_record[$key] = $this->_getDateHTML($key, $dt_value); + break; default: $new_record[$key] = htmlspecialchars($field['default']); diff --git a/interface/web/admin/lib/lang/de_server_config.lng b/interface/web/admin/lib/lang/de_server_config.lng index c9fc989da5a83b397ac69092c6b4797222105411..06384d5e32c9d2a478b3ab746ff3eddf66fcd2f4 100644 --- a/interface/web/admin/lib/lang/de_server_config.lng +++ b/interface/web/admin/lib/lang/de_server_config.lng @@ -26,7 +26,7 @@ $wb['mailuser_gid_txt'] = 'Mailbenutzer GID'; $wb['mailuser_name_txt'] = 'Mailbenutzer Name'; $wb['mailuser_group_txt'] = 'Mailbenutzer Gruppe'; $wb['mailbox_virtual_uidgid_maps_txt'] = 'Website Linux Uid für Mailboxen'; -$wb['mailbox_virtual_uidgid_maps_info_txt'] = 'nur wenn beides auf gleichem Server'; +$wb['mailbox_virtual_uidgid_maps_info_txt'] = 'nur für einzel-Server Installationen.'; $wb['mailbox_virtual_uidgid_maps_error_nosingleserver'] = 'Uid kann in Multiserver-Umgebung nicht gemappt werden.'; $wb['mailbox_virtual_uidgid_maps_error_nodovecot'] = 'Uid Mapping funktioniert nur in Verbindung mit dovecot.'; $wb['mailbox_virtual_uidgid_maps_error_alreadyusers'] = 'Uid Mapping kann nur umgeschaltet werden, wenn noch keine Mailuser angelegt sind.'; diff --git a/interface/web/admin/list/server_ip_map.list.php b/interface/web/admin/list/server_ip_map.list.php index 95ac17cac20764971a03643782e44c64b41138a4..c17aecb5c23cd42eed3d8646d7ae946435926ddc 100644 --- a/interface/web/admin/list/server_ip_map.list.php +++ b/interface/web/admin/list/server_ip_map.list.php @@ -18,7 +18,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste['item'][] = array( 'field' => 'server_id', 'datatype' => 'INTEGER', diff --git a/interface/web/admin/templates/directive_snippets_edit.htm b/interface/web/admin/templates/directive_snippets_edit.htm index b5adc5838cf88261b1ad8191827c72e1509aa8a2..eab53c79bbd82bb07bffce5775ea812006e8a53f 100644 --- a/interface/web/admin/templates/directive_snippets_edit.htm +++ b/interface/web/admin/templates/directive_snippets_edit.htm @@ -17,8 +17,8 @@ </div> <div class="form-group"> <label for="snippet" class="col-sm-3 control-label">{tmpl_var name='snippet_txt'}</label> - <tmpl_if name='is_master'><div class="col-sm-9 col-text"><pre>{tmpl_var name='snippet'}</pre></div></tmpl_else><div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea></div> - <div class="col-sm-3 col-text nginx"></div><div class="col-sm-9 col-text nginx"> {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>, <a href="javascript:void(0);" class="addPlaceholder">{PHPFALLBACKFASTCGIPASS}</a></div></tmpl_if> + <tmpl_if name='is_master'><div class="col-sm-9 col-text"><pre>{tmpl_var name='snippet'}</pre></div></tmpl_else><div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea> + Nginx {tmpl_var name='variables_txt'}: <a href="javascript:void(0);" class="addPlaceholder">{DOCROOT}</a>, <a href="javascript:void(0);" class="addPlaceholder">{FASTCGIPASS}</a>, <a href="javascript:void(0);" class="addPlaceholder">{PHPFALLBACKFASTCGIPASS}</a></div></tmpl_if> </div> <tmpl_if name='is_master'></tmpl_else> <div class="form-group php"> diff --git a/interface/web/client/form/client_template.tform.php b/interface/web/client/form/client_template.tform.php index a16d21ff8eeb97dfaecb41031479b98ec2b938ef..0fccee96014f21a993ad3dfda193fe0dc97a3041 100644 --- a/interface/web/client/form/client_template.tform.php +++ b/interface/web/client/form/client_template.tform.php @@ -114,7 +114,7 @@ $form["tabs"]['limits'] = array ( 'maxlength' => '10', 'rows' => '', 'cols' => '' - ), + ),/* 'default_mailserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', @@ -125,7 +125,7 @@ $form["tabs"]['limits'] = array ( ), 'value' => array(''), 'name' => 'default_mailserver' - ), + ),*/ 'limit_maildomain' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -321,7 +321,7 @@ $form["tabs"]['limits'] = array ( 'maxlength' => '10', 'rows' => '', 'cols' => '' - ), + ),/* 'default_xmppserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', @@ -332,7 +332,7 @@ $form["tabs"]['limits'] = array ( ), 'value' => '', 'name' => 'default_xmppserver' - ), + ),*/ 'xmpp_servers' => array ( 'datatype' => 'VARCHAR', 'formtype' => 'MULTIPLE', @@ -420,7 +420,7 @@ $form["tabs"]['limits'] = array ( 'formtype' => 'CHECKBOX', 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') - ), + ),/* 'default_webserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', @@ -431,7 +431,7 @@ $form["tabs"]['limits'] = array ( ), 'value' => array(''), 'name' => 'default_webserver' - ), + ),*/ 'limit_web_domain' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -623,7 +623,7 @@ $form["tabs"]['limits'] = array ( 'formtype' => 'CHECKBOX', 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') - ), + ),/* 'default_dnsserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', @@ -634,7 +634,7 @@ $form["tabs"]['limits'] = array ( ), 'value' => array(''), 'name' => 'default_dnsserver' - ), + ),*/ 'limit_dns_zone' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', @@ -704,6 +704,7 @@ $form["tabs"]['limits'] = array ( 'cols' => '' ), */ + /* 'default_dbserver' => array ( 'datatype' => 'INTEGER', 'formtype' => 'SELECT', @@ -714,7 +715,7 @@ $form["tabs"]['limits'] = array ( ), 'value' => array(''), 'name' => 'default_dbserver' - ), + ),*/ 'limit_database' => array ( 'datatype' => 'INTEGER', 'formtype' => 'TEXT', diff --git a/interface/web/client/templates/client_del.htm b/interface/web/client/templates/client_del.htm index 2ae0a8e700683abd9f4877dce9b5ceefeade8ae0..e24ca768c2a94047f4ed7be8bfabdc7f8f534af0 100644 --- a/interface/web/client/templates/client_del.htm +++ b/interface/web/client/templates/client_del.htm @@ -3,8 +3,6 @@ </div> <p><tmpl_var name="list_desc_txt"></p> - - <div id="OKMsg"> <tmpl_if name='number_records'> <tmpl_var name="delete_explanation">:<br /><br /> @@ -12,15 +10,15 @@ <tmpl_var name="table">, </tmpl_loop> </tmpl_else> - <tmpl_var name="confirm_client_delete_txt"> + <h3><tmpl_var name="confirm_client_delete_txt"></h3> </tmpl_if> </div> - - <div class="col-sm-9"><input class="form-control" type="checkbox" name="confirm" value="yes" /></div><b><tmpl_var name="confirm_action_txt"></b> - + + <div> <input type="checkbox" name="confirm" value="yes" /> <b><tmpl_var name="confirm_action_txt"></b></div> + <input type="hidden" name="id" value="{tmpl_var name='id'}"> - <div class="clear"><div class="right"> + <div class="clear"><div class="left"> <button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="client/client_del.php">{tmpl_var name='btn_save_txt'}</button> <button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="client/client_list.php">{tmpl_var name='btn_cancel_txt'}</button> </div></div> \ No newline at end of file diff --git a/interface/web/dns/dns_import.php b/interface/web/dns/dns_import.php index bd8cc84f36db01e166d9ff60324361729303db4a..6bb738ef1cf0a34f87bbbee6be04a00fcf1d80f8 100644 --- a/interface/web/dns/dns_import.php +++ b/interface/web/dns/dns_import.php @@ -38,11 +38,23 @@ $msg = ''; $error = ''; // Loading the template -$app->uses('tpl,validate_dns'); +$app->uses('tform,tpl,validate_dns'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl', 'templates/dns_import.htm'); $app->load_language_file('/web/dns/lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'); +// Check if dns record limit has been reached. We will check only users, not admins +if($_SESSION["s"]["user"]["typ"] == 'user') { + $app->tform->formDef['db_table_idx'] = 'id'; + $app->tform->formDef['db_table'] = 'dns_soa'; + if(!$app->tform->checkClientLimit('limit_dns_zone')) { + $app->error($app->lng('limit_dns_zone_txt')); + } + if(!$app->tform->checkResellerLimit('limit_dns_zone')) { + $app->error('Reseller: '.$app->lng('limit_dns_zone_txt')); + } +} + // import variables $template_id = (isset($_POST['template_id']))?$app->functions->intval($_POST['template_id']):0; $sys_groupid = (isset($_POST['client_group_id']))?$app->functions->intval($_POST['client_group_id']):0; diff --git a/interface/web/dns/dns_wizard.php b/interface/web/dns/dns_wizard.php index 3cfc397bb14e6cd79d465485ffbcf6e18d09ce0f..a0fd131ae1b5e3a1604c5f7d3cf03f19df18372c 100644 --- a/interface/web/dns/dns_wizard.php +++ b/interface/web/dns/dns_wizard.php @@ -36,11 +36,23 @@ $app->auth->check_module_permissions('dns'); // Loading the template -$app->uses('tpl,validate_dns'); +$app->uses('tpl,validate_dns,tform'); $app->tpl->newTemplate("form.tpl.htm"); $app->tpl->setInclude('content_tpl', 'templates/dns_wizard.htm'); $app->load_language_file('/web/dns/lib/lang/'.$_SESSION['s']['language'].'_dns_wizard.lng'); +// Check if dns record limit has been reached. We will check only users, not admins +if($_SESSION["s"]["user"]["typ"] == 'user') { + $app->tform->formDef['db_table_idx'] = 'id'; + $app->tform->formDef['db_table'] = 'dns_soa'; + if(!$app->tform->checkClientLimit('limit_dns_zone')) { + $app->error($app->lng('limit_dns_zone_txt')); + } + if(!$app->tform->checkResellerLimit('limit_dns_zone')) { + $app->error('Reseller: '.$app->lng('limit_dns_zone_txt')); + } +} + // import variables $template_id = (isset($_POST['template_id']))?$app->functions->intval($_POST['template_id']):0; $sys_groupid = (isset($_POST['client_group_id']))?$app->functions->intval($_POST['client_group_id']):0; diff --git a/interface/web/dns/lib/lang/de_dns_wizard.lng b/interface/web/dns/lib/lang/de_dns_wizard.lng index 7f664ca60e5e5c9938084edff382aed1f674bdf7..e34604a4dcf8169868dc6f0b28939d86c6481442 100644 --- a/interface/web/dns/lib/lang/de_dns_wizard.lng +++ b/interface/web/dns/lib/lang/de_dns_wizard.lng @@ -40,5 +40,6 @@ $wb['globalsearch_noresults_limit_txt'] = '0 Treffer'; $wb['globalsearch_searchfield_watermark_txt'] = 'Suche'; $wb['globalsearch_suggestions_text_txt'] = 'Vorschläge'; $wb['error_no_server_id'] = 'No server provided.'; -$wb['error_not_allowed_server_id'] = 'The selected server is not allowed for this account.'; +$wb['error_not_allowed_server_id'] = 'Der ausgewählte Server ist in diesem Konto nicht verfügbar.'; +$wb['limit_dns_zone_txt'] = 'Die maximale Anzahl an DNS Einträgen für Ihr Konto wurde erreicht.'; ?> diff --git a/interface/web/dns/lib/lang/en_dns_wizard.lng b/interface/web/dns/lib/lang/en_dns_wizard.lng index a2cec089dff2985c425edaa1726cfc314f05514f..6a63e212815ec6a6e9319d2234287f6977d4fb5f 100644 --- a/interface/web/dns/lib/lang/en_dns_wizard.lng +++ b/interface/web/dns/lib/lang/en_dns_wizard.lng @@ -41,4 +41,5 @@ $wb['globalsearch_searchfield_watermark_txt'] = "Search"; $wb['globalsearch_suggestions_text_txt'] = "Suggestions"; $wb['error_no_server_id'] = 'No server provided.'; $wb['error_not_allowed_server_id'] = 'The selected server is not allowed for this account.'; +$wb["limit_dns_zone_txt"] = 'The max. number of DNS zones for your account is reached.'; ?> diff --git a/interface/web/login/index.php b/interface/web/login/index.php index a1da652ad32a95664f28ef5930038086527af699..2ecf4ac93defac20d7da0c268bd7d770c0cd2616 100644 --- a/interface/web/login/index.php +++ b/interface/web/login/index.php @@ -217,6 +217,7 @@ if(count($_POST) > 0) { $_SESSION['s']['user']['theme'] = isset($user['app_theme']) ? $user['app_theme'] : 'default'; $_SESSION['s']['language'] = $user['language']; $_SESSION["s"]['theme'] = $_SESSION['s']['user']['theme']; + if ($loginAs) $_SESSION['s']['plugin_cache'] = $_SESSION['s_old']['plugin_cache']; if(is_file(ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php')) { include_once ISPC_WEB_PATH . '/' . $_SESSION['s']['user']['startmodule'].'/lib/module.conf.php'; diff --git a/interface/web/login/login_as.php b/interface/web/login/login_as.php index a17d5baff12a7eba281725162a480615595f148d..4b78c6c41b530b1a9a3b10842b53e9e12e6c084a 100644 --- a/interface/web/login/login_as.php +++ b/interface/web/login/login_as.php @@ -98,8 +98,8 @@ echo ' <input type="hidden" name="s_pg" value="dashboard" /> <input type="hidden" name="login_as" value="1" /> <div class="wf_actions buttons"> - <button class="positive iconstxt icoPositive" type="button" value="'.$wb['btn_yes_txt'].'" data-submit-form="pageForm" data-form-action="/login/index.php"><span>'.$wb['btn_yes_txt'].'</span></button> - <button class="negative iconstxt icoNegative" type="button" value="'.$wb['btn_back_txt'].'" data-load-content="'.$backlink.'"><span>'.$wb['btn_back_txt'].'</span></button> + <button class="btn btn-default formbutton-success" type="button" value="'.$wb['btn_yes_txt'].'" data-submit-form="pageForm" data-form-action="/login/index.php"><span>'.$wb['btn_yes_txt'].'</span></button> + <button class="btn btn-default formbutton-default" value="'.$wb['btn_back_txt'].'" data-load-content="'.$backlink.'"><span>'.$wb['btn_back_txt'].'</span></button> </div> '; ?> diff --git a/interface/web/login/logout.php b/interface/web/login/logout.php index ee6fffa31249b8acae8ed9410cd85e53edfcc729..a4a127ff8bcfa3cd3e48fcd1f3cfa311a070e84e 100644 --- a/interface/web/login/logout.php +++ b/interface/web/login/logout.php @@ -56,8 +56,8 @@ if ((isset($_SESSION['s_old']) && ($_SESSION['s_old']['user']['typ'] == 'admin' <input type="hidden" name="s_pg" value="index" /> <input type="hidden" name="login_as" value="1" /> <div class="wf_actions buttons"> - <button class="positive iconstxt icoPositive" type="button" value="Yes, re-login as ' . $utype . '" data-submit-form="pageForm" data-form-action="/login/index.php"><span>Yes, re-login as ' . $utype . '</span></button> - <button class="negative iconstxt icoNegative" type="button" value="No, logout" data-load-content="login/logout.php?l=1"><span>No, logout</span></button> + <button class="btn btn-default formbutton-success" type="button" value="Yes, re-login as ' . $utype . '" data-submit-form="pageForm" data-form-action="/login/index.php"><span>Yes, re-login as ' . $utype . '</span></button> + <button class="btn btn-default formbutton-default" type="button" value="No, logout" data-load-content="login/logout.php?l=1"><span>No, logout</span></button> </div> '; exit; diff --git a/interface/web/mail/list/mail_alias.list.php b/interface/web/mail/list/mail_alias.list.php index fcbfb94591374afd1d623387838425a262bd563c..044fc84baad24b5db048730d34730f0327cb1091 100644 --- a/interface/web/mail/list/mail_alias.list.php +++ b/interface/web/mail/list/mail_alias.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_aliasdomain.list.php b/interface/web/mail/list/mail_aliasdomain.list.php index 8408e9e60469769f9d6a8dace8607b0ce4aba05c..b97d265e48345287c2f8ee15138e3dfcf37d30cd 100644 --- a/interface/web/mail/list/mail_aliasdomain.list.php +++ b/interface/web/mail/list/mail_aliasdomain.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_blacklist.list.php b/interface/web/mail/list/mail_blacklist.list.php index 3e92caeedadc5d4ef2480b95bba7501fed5861cc..45a3a9987c05d1cd219add6014a9b51fe80776a0 100644 --- a/interface/web/mail/list/mail_blacklist.list.php +++ b/interface/web/mail/list/mail_blacklist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); diff --git a/interface/web/mail/list/mail_content_filter.list.php b/interface/web/mail/list/mail_content_filter.list.php index 18b0cf252c3efc4937d7747cda0a68c412b32c5d..c585a1601a0ad602a173b2dc70365a3023cdef4c 100644 --- a/interface/web/mail/list/mail_content_filter.list.php +++ b/interface/web/mail/list/mail_content_filter.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); diff --git a/interface/web/mail/list/mail_domain.list.php b/interface/web/mail/list/mail_domain.list.php index c2005aeb3e5747d26813f094daa23cd1bf98fc77..7946f4c51ab4fa375c38f4b9f4859567e05f89fe 100644 --- a/interface/web/mail/list/mail_domain.list.php +++ b/interface/web/mail/list/mail_domain.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); if($_SESSION['s']['user']['typ'] == 'admin') { diff --git a/interface/web/mail/list/mail_domain_catchall.list.php b/interface/web/mail/list/mail_domain_catchall.list.php index 4413c491a2d5d35b12ea6bbb7aa00c306f4f28fd..e2aa2d63aa28913e1e0b630157e26fa714000c7b 100644 --- a/interface/web/mail/list/mail_domain_catchall.list.php +++ b/interface/web/mail/list/mail_domain_catchall.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_forward.list.php b/interface/web/mail/list/mail_forward.list.php index 831e8b458bd72307ba7913613dc5711d200c0eaf..bd334d74347eaf01b4814a44032a9e33c82c9884 100644 --- a/interface/web/mail/list/mail_forward.list.php +++ b/interface/web/mail/list/mail_forward.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "source", diff --git a/interface/web/mail/list/mail_get.list.php b/interface/web/mail/list/mail_get.list.php index d027110ad4cdf40169d2cb82309a99ca438043c8..3163f4e10867ba4040ba51ea7d0d232b248d65a7 100644 --- a/interface/web/mail/list/mail_get.list.php +++ b/interface/web/mail/list/mail_get.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_relay_recipient.list.php b/interface/web/mail/list/mail_relay_recipient.list.php index 8b7e308a20d7d9ad5db08efa82584da565a9cf29..3e3fd91012c5235c3faf89148c68f2fddf0e8c0b 100644 --- a/interface/web/mail/list/mail_relay_recipient.list.php +++ b/interface/web/mail/list/mail_relay_recipient.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_spamfilter.list.php b/interface/web/mail/list/mail_spamfilter.list.php index 0db3e7c9a865973eb3e45cf513dc8e0140da3804..f1f4e612c28576d84c12cb9c4a1411e3c4afb278 100644 --- a/interface/web/mail/list/mail_spamfilter.list.php +++ b/interface/web/mail/list/mail_spamfilter.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('1' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", '0' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_transport.list.php b/interface/web/mail/list/mail_transport.list.php index 6cbc2dfb96a4f83743e943512537082f757f0ed4..9124b937fdc7504e676c50d5531c2bf55c7aa3d9 100644 --- a/interface/web/mail/list/mail_transport.list.php +++ b/interface/web/mail/list/mail_transport.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/mail_user.list.php b/interface/web/mail/list/mail_user.list.php index fd15658eac85cc6d27238e5d2fc59263f3594442..1c56140cb24e0a685472df6fe430d1ad323027c9 100644 --- a/interface/web/mail/list/mail_user.list.php +++ b/interface/web/mail/list/mail_user.list.php @@ -87,7 +87,7 @@ $liste["item"][] = array( 'field' => "autoresponder", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "postfix", 'datatype' => "VARCHAR", @@ -96,7 +96,7 @@ $liste["item"][] = array( 'field' => "postfix", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "disablesmtp", 'datatype' => "VARCHAR", @@ -105,7 +105,7 @@ $liste["item"][] = array( 'field' => "disablesmtp", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "disableimap", 'datatype' => "VARCHAR", @@ -114,7 +114,7 @@ $liste["item"][] = array( 'field' => "disableimap", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "disablepop3", 'datatype' => "VARCHAR", @@ -123,6 +123,6 @@ $liste["item"][] = array( 'field' => "disablepop3", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('n' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'y' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); ?> diff --git a/interface/web/mail/list/mail_whitelist.list.php b/interface/web/mail/list/mail_whitelist.list.php index 0d8a0ffd70127a50fd7cf9ac00522f4d02e0ec45..321db859926c97488e78759ed44c7ce1ab2bd4f6 100644 --- a/interface/web/mail/list/mail_whitelist.list.php +++ b/interface/web/mail/list/mail_whitelist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_blacklist.list.php b/interface/web/mail/list/spamfilter_blacklist.list.php index cdf5a0e536820b15eb54db2970bedf138a426751..b4be804fbe4f15dea44aa13516661f90f0411e76 100644 --- a/interface/web/mail/list/spamfilter_blacklist.list.php +++ b/interface/web/mail/list/spamfilter_blacklist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_policy.list.php b/interface/web/mail/list/spamfilter_policy.list.php index eeb8746f0da4daeb315a411c76d84a811332571f..e7e0def6824b13163a662eb6b481cdba70b8caf0 100644 --- a/interface/web/mail/list/spamfilter_policy.list.php +++ b/interface/web/mail/list/spamfilter_policy.list.php @@ -65,7 +65,7 @@ $liste["item"][] = array( 'field' => "virus_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "spam_lover", @@ -75,7 +75,7 @@ $liste["item"][] = array( 'field' => "spam_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "banned_files_lover", @@ -85,7 +85,7 @@ $liste["item"][] = array( 'field' => "banned_files_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "bad_header_lover", @@ -95,7 +95,7 @@ $liste["item"][] = array( 'field' => "bad_header_lover", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); diff --git a/interface/web/mail/list/spamfilter_users.list.php b/interface/web/mail/list/spamfilter_users.list.php index efd74f68e91522c0f1fa59f57320b52992026b3f..e9d703b94295eba400fded746be7ca93c8493847 100644 --- a/interface/web/mail/list/spamfilter_users.list.php +++ b/interface/web/mail/list/spamfilter_users.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "local", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('Y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'N' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/spamfilter_whitelist.list.php b/interface/web/mail/list/spamfilter_whitelist.list.php index 3082329199f1516bd19cf2345c6727020c75dcc0..713187e0080c220ca31981df73a46fa9eaa45d59 100644 --- a/interface/web/mail/list/spamfilter_whitelist.list.php +++ b/interface/web/mail/list/spamfilter_whitelist.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/mail/list/xmpp_domain.list.php b/interface/web/mail/list/xmpp_domain.list.php index 21257e428312c11638025500f5c1662ea73e84a0..be87ec735ea2387241bbbac6120fa0aed8a135ce 100644 --- a/interface/web/mail/list/xmpp_domain.list.php +++ b/interface/web/mail/list/xmpp_domain.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); if($_SESSION['s']['user']['typ'] == 'admin') { diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index a155cbdbfa00d706a93819043d5e7a9690cd8ca3..aedcd2249b9e8da4a1a6a365d98c4dc634935fbf 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -237,8 +237,13 @@ class page_action extends tform_actions { $this->dataRecord["homedir"] = $mail_config["homedir_path"]; // Will be overwritten by mail_plugin - $this->dataRecord['uid'] = -1; - $this->dataRecord['gid'] = -1; + if ($mail_config["mailbox_virtual_uidgid_maps"] == 'y') { + $this->dataRecord['uid'] = -1; + $this->dataRecord['gid'] = -1; + } else { + $this->dataRecord['uid'] = intval($mail_config["mailuser_uid"]); + $this->dataRecord['gid'] = intval($mail_config["mailuser_gid"]); + } //* Check if there is no alias or forward with this address $tmp = $app->db->queryOneRecord("SELECT count(forwarding_id) as number FROM mail_forwarding WHERE active = 'y' AND source = ?", $this->dataRecord["email"]); diff --git a/interface/web/mail/xmpp_domain_edit.php b/interface/web/mail/xmpp_domain_edit.php index b5858e01ef224bcddf97dc76b6528714d37d99e8..16046dbc8fc3acf96e20540f73d37a646bb865d5 100644 --- a/interface/web/mail/xmpp_domain_edit.php +++ b/interface/web/mail/xmpp_domain_edit.php @@ -402,7 +402,7 @@ class page_action extends tform_actions { // $this->desyncMailusers($this->dataRecord['domain']); // Update DNS Records // TODO: Update gets only triggered from main form. WHY? - $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND = ?", $this->dataRecord['domain'].'.'); + $soa = $app->db->queryOneRecord("SELECT id AS zone, sys_userid, sys_groupid, sys_perm_user, sys_perm_group, sys_perm_other FROM dns_soa WHERE active = 'Y' AND `origin` = ?", $this->dataRecord['domain'].'.'); if ( isset($soa) && !empty($soa) ) $this->update_dns($this->dataRecord, $soa); } diff --git a/interface/web/monitor/lib/lang/pl.lng b/interface/web/monitor/lib/lang/pl.lng index c2629c41873a6f09d77c585de00d85738a95926c..4ce642fbd8ba36e922bb1fe25add725cf9391764 100644 --- a/interface/web/monitor/lib/lang/pl.lng +++ b/interface/web/monitor/lib/lang/pl.lng @@ -24,7 +24,7 @@ $wb['Status of services'] = 'Status usÅ‚ug'; $wb['No Refresh'] = 'Nie odÅ›wieżaj'; $wb['minutes'] = 'minuty'; $wb['Show Overview'] = 'Pokaż wszystko'; -$wb['System State (All Servers)'] = 'Status systemu (Wszystkie serwery)'; +$wb['System State (All Servers)'] = 'Status systemu'; $wb['Hardware-Information'] = 'Informacje o sprzÄ™cie'; $wb['Show CPU info'] = 'Pokaż informacje o procesorze'; $wb['Server State'] = 'Status serwera'; diff --git a/interface/web/sites/ajax_get_ip.php b/interface/web/sites/ajax_get_ip.php index 205be4803b08d894189d5e75d31725a1a700485c..8c83191920887351e67d2232152fe20623615d04 100644 --- a/interface/web/sites/ajax_get_ip.php +++ b/interface/web/sites/ajax_get_ip.php @@ -39,13 +39,15 @@ $server_id = $app->functions->intval($_GET["server_id"]); $client_group_id = $app->functions->intval($_GET["client_group_id"]); $ip_type = $_GET['ip_type']; -if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION['s']['user']['userid'])) { +//if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION['s']['user']['userid'])) { //* Get global web config $web_config = $app->getconf->get_server_config($server_id, 'web'); + + $tmp = $app->db->queryOneRecord("SELECT client_id FROM sys_group WHERE groupid = ?", $client_group_id); + $sql = "SELECT ip_address FROM server_ip WHERE ip_type = ? AND server_id = ? AND (client_id = 0 OR client_id=?)"; - $sql = "SELECT ip_address FROM server_ip WHERE ip_type = ? AND server_id = ?"; - $ips = $app->db->queryAllRecords($sql, $ip_type, $server_id); + $ips = $app->db->queryAllRecords($sql, $ip_type, $server_id, $tmp['groupid']); // $ip_select = "<option value=''></option>"; if($ip_type == 'IPv4'){ $ip_select = ($web_config['enable_ip_wildcard'] == 'y')?"*#":""; @@ -60,7 +62,7 @@ if($_SESSION["s"]["user"]["typ"] == 'admin' or $app->auth->has_clients($_SESSION } unset($tmp); unset($ips); -} +//} echo substr($ip_select, 0, -1); ?> diff --git a/interface/web/sites/aps_install_package.php b/interface/web/sites/aps_install_package.php index bcd4184dd9f0139861b42be79ffb4a71a4371916..19ab785c957d5df02db5f7ceb0275832fe524c84 100644 --- a/interface/web/sites/aps_install_package.php +++ b/interface/web/sites/aps_install_package.php @@ -129,7 +129,7 @@ $domains_tpl = ''; if(!empty($domains)) { $set = array(); - $set[] = '<select name="main_domain" id="main_domain" class="form-control">'; + $set[] = '<select name="main_domain" id="main_domain" class="form-control" style="width:100%; height:100%; min-width:170px;">'; foreach($domains as $domain) { $selected = ''; diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php index 5e95fdcaf8cfbeec4e667d995f969e2ebb2be02a..a87a33dc5f05b357b9f48765e5742325492863a4 100644 --- a/interface/web/sites/database_quota_stats.php +++ b/interface/web/sites/database_quota_stats.php @@ -29,7 +29,7 @@ if(is_array($tmp_rec)) { foreach($tmp_array as $database_name => $data) { $db_name = $data['database_name']; - $temp = $app->db->queryOneRecord("SELECT client.username, web_database.database_quota FROM web_database, sys_group, client WHERE sys_group.client_id = client.client_id AND web_database.database_name = ?", $db_name); + $temp = $app->db->queryOneRecord("SELECT client.username, web_database.database_quota FROM web_database, sys_group, client WHERE sys_group.groupid = web_database.sys_groupid AND sys_group.client_id = client.client_id AND web_database.database_name = ?", $db_name); if(is_array($temp) && !empty($temp)) { $monitor_data[$server_id.'.'.$db_name]['database_name'] = $data['database_name']; $monitor_data[$server_id.'.'.$db_name]['client'] = isset($temp['username']) ? $temp['username'] : ''; @@ -80,7 +80,8 @@ class list_action extends listform_actions { $client = $app->db->queryOneRecord("SELECT * FROM client WHERE client_id = ?", $sys_group['client_id']); $rec['client'] = $client['username']; $rec['used'] = 'n/a'; - $rec['quota'] = 'n/a'; + if (empty($rec['database_quota'])) $rec['database_quota'] = 0; + $rec['quota'] = $rec['database_quota']; } $rec['id'] = $rec[$this->idx_key]; diff --git a/interface/web/sites/list/cron.list.php b/interface/web/sites/list/cron.list.php index 311af329c5f07b3a2f57a0c6f99908fab2f44dba..7679a2e1c18c1ae42403242c582ad7472484bc8c 100644 --- a/interface/web/sites/list/cron.list.php +++ b/interface/web/sites/list/cron.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 22694aaa2175dea806aee5d0fce15775a332984f..b4d1196b59067c759fcbbda88bc23b082d8c1733 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -59,7 +59,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "remote_access", 'datatype' => "VARCHAR", @@ -68,7 +68,7 @@ $liste["item"][] = array( 'field' => "remote_access", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "type", 'datatype' => "VARCHAR", diff --git a/interface/web/sites/list/ftp_user.list.php b/interface/web/sites/list/ftp_user.list.php index 9742a242741b069e6e9e07dd57551c7e184c85bd..765740638287838efcb710225aec2c999657104c 100644 --- a/interface/web/sites/list/ftp_user.list.php +++ b/interface/web/sites/list/ftp_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/shell_user.list.php b/interface/web/sites/list/shell_user.list.php index 61c774dee66ebe1718aaaae82a81ad14abda75f1..9ea244ed0b2071ccd47cfb29b4b4d55d84fd409d 100644 --- a/interface/web/sites/list/shell_user.list.php +++ b/interface/web/sites/list/shell_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_childdomain.list.php b/interface/web/sites/list/web_childdomain.list.php index f938bee3226d042cfa9f35c5e3031fef0058b8c3..1e38b24a4152f564031320843db558f8a427f00e 100644 --- a/interface/web/sites/list/web_childdomain.list.php +++ b/interface/web/sites/list/web_childdomain.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_folder.list.php b/interface/web/sites/list/web_folder.list.php index af74d8e95004f1a8b76ec1ff7d95e6f7fbe46a56..fce8cfd1efef57f5d482ef0066514f94c9aa3150 100644 --- a/interface/web/sites/list/web_folder.list.php +++ b/interface/web/sites/list/web_folder.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/list/web_folder_user.list.php b/interface/web/sites/list/web_folder_user.list.php index 454e2c447fad6a2684a3e9727ea3379d2b161346..c8f078a4be9738581accb3e9d90434379a9f991c 100644 --- a/interface/web/sites/list/web_folder_user.list.php +++ b/interface/web/sites/list/web_folder_user.list.php @@ -57,7 +57,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "web_folder_id", diff --git a/interface/web/sites/list/web_vhost_domain.list.php b/interface/web/sites/list/web_vhost_domain.list.php index ddeaacc6e6c9239b1d070110ec9b79d431f292ff..1d167a77bc67674a1d2e1e07f406e8c3e99aba8e 100644 --- a/interface/web/sites/list/web_vhost_domain.list.php +++ b/interface/web/sites/list/web_vhost_domain.list.php @@ -78,7 +78,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); if($_SESSION['s']['user']['typ'] == 'admin' && $vhostdomain_type == 'domain') { $liste["item"][] = array( 'field' => "sys_groupid", diff --git a/interface/web/sites/list/webdav_user.list.php b/interface/web/sites/list/webdav_user.list.php index 52a3ab9631bd9c9f6204d65c65f8ff3c64da0e25..5d1aeec94a9f82e6857639475d91ecf000904ea6 100644 --- a/interface/web/sites/list/webdav_user.list.php +++ b/interface/web/sites/list/webdav_user.list.php @@ -55,7 +55,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('Yes')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('No')."</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "server_id", diff --git a/interface/web/sites/templates/web_vhost_domain_edit.htm b/interface/web/sites/templates/web_vhost_domain_edit.htm index ec9005a2e3f76700fb4c0010a80e118077232407..22a1952704229b8e6321b6d8a3f477f08a64d816 100644 --- a/interface/web/sites/templates/web_vhost_domain_edit.htm +++ b/interface/web/sites/templates/web_vhost_domain_edit.htm @@ -432,8 +432,8 @@ function reloadFastcgiPHPVersions(noFormChange) { jQuery.getJSON('sites/ajax_get_json.php'+ '?' + Math.round(new Date().getTime()), {server_id : serverId, php_type : jQuery('#php').val(), type : "getphpfastcgi", client_group_id : clientGroupId}, function(data) { - //var options = '<option value="">Default</option>'; - var options = ''; + var options = '<option value="">Default</option>'; + //var options = ''; var phpfastcgiselected = ''; $.each(data, function(key, val) { <tmpl_if name="id"> diff --git a/interface/web/sites/web_vhost_domain_edit.php b/interface/web/sites/web_vhost_domain_edit.php index 647061e7346c7f55975587c5b9609695ddce1f84..6f843571a3b7d15653ae0515ee8e4b74899a45fa 100644 --- a/interface/web/sites/web_vhost_domain_edit.php +++ b/interface/web/sites/web_vhost_domain_edit.php @@ -188,7 +188,7 @@ class page_action extends tform_actions { } $server_id = intval(@$this->dataRecord["server_id"]); } else { - $server_id = (isset($web_servers[0])) ? intval($web_servers[0]) : 0; + $server_id = (isset($web_servers[0])) ? intval($web_servers[0]['server_id']) : 0; } if($app->functions->intval($this->dataRecord["server_id"]) > 0) { @@ -200,9 +200,9 @@ class page_action extends tform_actions { } } - //* Fill the IPv4 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; - $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers'])); + //* Fill the IPv4 select field with the IP addresses that are allowed for this client on the current server + $sql = "SELECT ip_address FROM server_ip WHERE server_id = ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$_SESSION['s']['user']['client_id'].")"; + $ips = $app->db->queryAllRecords($sql, $server_id); $ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":""; //if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "<option value='".$this->dataRecord["ip_address"]."' SELECTED>".$this->dataRecord["ip_address"]."</option>\r\n"; //$ip_select = ""; @@ -217,8 +217,8 @@ class page_action extends tform_actions { unset($ips); //* Fill the IPv6 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; - $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers']), $_SESSION['s']['user']['client_id']); + $sql = "SELECT ip_address FROM server_ip WHERE server_id = ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, $server_id, $_SESSION['s']['user']['client_id']); //$ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":""; //$ip_select = ""; $ip_select = "<option value=''></option>"; @@ -305,6 +305,17 @@ class page_action extends tform_actions { $app->tpl->setVar("server_id", $options_web_servers); unset($options_web_servers); + + if($this->id > 0) { + if(!isset($this->dataRecord["server_id"])){ + $tmp = $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE domain_id = ?", $this->id); + $this->dataRecord["server_id"] = $tmp["server_id"]; + unset($tmp); + } + $server_id = intval(@$this->dataRecord["server_id"]); + } else { + $server_id = (isset($web_servers[0])) ? intval($web_servers[0]['server_id']) : 0; + } if ($settings['use_domain_module'] != 'y') { // Fill the client select field @@ -335,8 +346,8 @@ class page_action extends tform_actions { } //* Fill the IPv4 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=?)"; - $ips = $app->db->queryAllRecords($sql, explode(',', $client['web_servers']), $_SESSION['s']['user']['client_id']); + $sql = "SELECT ip_address FROM server_ip WHERE server_id = ? AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, $server_id, $_SESSION['s']['user']['client_id']); $ip_select = ($web_config[$server_id]['enable_ip_wildcard'] == 'y')?"<option value='*'>*</option>":""; //if(!in_array($this->dataRecord["ip_address"], $ips)) $ip_select .= "<option value='".$this->dataRecord["ip_address"]."' SELECTED>".$this->dataRecord["ip_address"]."</option>\r\n"; //$ip_select = ""; @@ -351,8 +362,8 @@ class page_action extends tform_actions { unset($ips); //* Fill the IPv6 select field with the IP addresses that are allowed for this client - $sql = "SELECT ip_address FROM server_ip WHERE server_id IN ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; - $ips = $app->db->queryAllRecords($sql, $client['web_servers'], $_SESSION['s']['user']['client_id']); + $sql = "SELECT ip_address FROM server_ip WHERE server_id = ? AND ip_type = 'IPv6' AND (client_id = 0 OR client_id=?)"; + $ips = $app->db->queryAllRecords($sql, $server_id, $_SESSION['s']['user']['client_id']); $ip_select = "<option value=''></option>"; //$ip_select = ""; if(is_array($ips)) { @@ -1460,9 +1471,13 @@ class page_action extends tform_actions { $this->dataRecord["domain"] = $rec['domain']; } if(isset($this->dataRecord["ip_address"]) && $rec['ip_address'] != $this->dataRecord["ip_address"] && $rec['sys_perm_group'] != 'riud') { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The IP can not be changed. Please ask your Administrator if you want to change the IPv4-Address.'); $this->dataRecord["ip_address"] = $rec['ip_address']; } if(isset($this->dataRecord["ipv6_address"]) && $rec['ipv6_address'] != $this->dataRecord["ipv6_address"] && $rec['sys_perm_group'] != 'riud') { + //* Add a error message and switch back to old server + $app->tform->errorMessage .= $app->lng('The IP can not be changed. Please ask your Administrator if you want to change the IPv6-Address.'); $this->dataRecord["ipv6_address"] = $rec['ipv6_address']; } unset($rec); diff --git a/interface/web/themes/default/assets/javascripts/ispconfig.js b/interface/web/themes/default/assets/javascripts/ispconfig.js index 21c8c1bb1447132db36596cc515c5ebe33ffa586..a726d0a220e9bbbfb20f11f352daf6b6132866aa 100644 --- a/interface/web/themes/default/assets/javascripts/ispconfig.js +++ b/interface/web/themes/default/assets/javascripts/ispconfig.js @@ -23,11 +23,7 @@ var ISPConfig = { }, reportError: function(request) { - /* Error reporting is disabled by default as some browsers like safari - sometimes throw errors when a ajax request is delayed even if the - ajax request worked. */ - - /*alert(request);*/ + }, registerHook: function(name, callback) { @@ -142,55 +138,6 @@ var ISPConfig = { ISPConfig.callHook('onAfterContentLoad', {'url': url, 'data': data }); }, - /* THIS ONE SHOULD BE REMOVED AFTER CREATING THE STATIC LOGIN PAGE!!! */ - /*submitLoginForm: function(formname) { - //* Validate form. TODO: username and password with strip(); - var frm = document.getElementById(formname); - var userNameObj = frm.username; - if(userNameObj.value == ''){ - userNameObj.focus(); - return; - } - var passwordObj = frm.passwort; - if(passwordObj.value == ''){ - passwordObj.focus(); - return; - } - - $('#dummy_username').val(userNameObj.value); - $('#dummy_passwort').val(passwordObj.value); - $('#dummy_login_form').submit(); - - var submitFormObj = $.ajax({ - type: "POST", - url: "content.php", - data: $('#'+formname).serialize(), - dataType: "html", - beforeSend: function() { - ISPConfig.showLoadIndicator(); - }, - success: function(data, textStatus, jqXHR) { - if(jqXHR.responseText.indexOf('HEADER_REDIRECT:') > -1) { - var parts = jqXHR.responseText.split(':'); - ISPConfig.loadContent(parts[1]); - } else if (jqXHR.responseText.indexOf('LOGIN_REDIRECT:') > -1) { - // Go to the login page - document.location.href = 'index.php'; - } else { - $('#pageContent').html(jqXHR.responseText); - ISPConfig.onAfterContentLoad('content.php', $('#'+formname).serialize()); - ISPConfig.pageFormChanged = false; - } - ISPConfig.loadMenus(); - ISPConfig.hideLoadIndicator(); - }, - error: function() { - ISPConfig.hideLoadIndicator(); - ISPConfig.reportError('Ajax Request was not successful.110'); - } - }); - },*/ - submitForm: function(formname, target, confirmation) { var successMessage = arguments[3]; if(!confirmation) confirmation = false; @@ -320,11 +267,6 @@ var ISPConfig = { var newUrl= jqXHR.responseText.substr(jqXHR.responseText.indexOf('URL_REDIRECT:') + "URL_REDIRECT:".length); document.location.href = newUrl; } else { - //document.getElementById('pageContent').innerHTML = jqXHR.responseText; - //var reponse = $(jqXHR.responseText); - //var reponseScript = reponse.filter("script"); - //$.each(reponseScript, function(idx, val) { eval(val.text); } ); - $('#pageContent').html(jqXHR.responseText); ISPConfig.onAfterContentLoad(pagename, (params ? params : null)); ISPConfig.pageFormChanged = false; @@ -444,7 +386,10 @@ var ISPConfig = { }, changeTab: function(tab, target, force) { - if(ISPConfig.requestsRunning > 0) return false; + if(ISPConfig.requestsRunning > 0) { + console.log('tab change interrupted, request still running.'); + return false; + } document.pageForm.next_tab.value = tab; @@ -618,9 +563,17 @@ $(document).on("change", function(event) { } }); +var $page = $('html, body'); + $(document).on('click', 'a[data-load-content],button[data-load-content]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + if(ISPConfig.requestsRunning > 0) { + console.log('preventing click because there is still a request running.'); + return; + } + + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var content_to_load = $(this).attr('data-load-content'); if(!content_to_load) return this; @@ -630,7 +583,13 @@ $(document).on('click', 'a[data-load-content],button[data-load-content]', functi $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + if(ISPConfig.requestsRunning > 0) { + console.log('preventing click because there is still a request running.'); + return; + } + + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var content_to_load = $(this).attr('data-capp'); if(!content_to_load) return this; @@ -640,7 +599,13 @@ $(document).on('click', 'a[data-capp],button[data-capp]', function(e) { $(document).on('click', 'a[data-submit-form],button[data-submit-form]', function(e) { e.preventDefault(); - $('html, body').animate({scrollTop: 0}, 1000); + if(ISPConfig.requestsRunning > 0) { + console.log('preventing click because there is still a request running.'); + return; + } + + $page.on('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); + $page.animate({scrollTop: 0}, 1000, function() { $page.off('scroll mousedown wheel DOMMouseScroll mousewheel keyup touchmove', function() { $page.stop(); }); }); var $el = $(this); var act = $el.attr('data-form-action'); diff --git a/interface/web/themes/default/templates/error.tpl.htm b/interface/web/themes/default/templates/error.tpl.htm index f0c10811c2d9c30bd9554ba2245dc2c272738aa8..dbb730f59960def03ce504c79db2251f38b55909 100644 --- a/interface/web/themes/default/templates/error.tpl.htm +++ b/interface/web/themes/default/templates/error.tpl.htm @@ -4,6 +4,5 @@ <ol> <li>###ERRORMSG###</li> </ol> - <div>TODO: WRONG HTML ELEMENTS</div> </div> </div> diff --git a/interface/web/themes/default/templates/main.tpl.htm b/interface/web/themes/default/templates/main.tpl.htm index 058eec33ab96ef07987fb218ff4ee1f874ef1bec..24a84c506522bcc927c6c3e221f9ae1233c4750b 100644 --- a/interface/web/themes/default/templates/main.tpl.htm +++ b/interface/web/themes/default/templates/main.tpl.htm @@ -84,7 +84,7 @@ <script type="text/javascript" src="js/jquery.min.js"></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap-datetimepicker.min.js'></script> - <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.min.js'></script> + <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/modernizr.custom.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/pushy.min.js'></script> <script src='themes/<tmpl_var name='current_theme'>/assets/javascripts/responsive.min.js'></script> diff --git a/interface/web/themes/default/templates/main_login.tpl.htm b/interface/web/themes/default/templates/main_login.tpl.htm index afcf4cf3172ffd37978619df339dc97469c3dc1d..129633ed6f56ef247aff4bd531c4b2344fb35136 100644 --- a/interface/web/themes/default/templates/main_login.tpl.htm +++ b/interface/web/themes/default/templates/main_login.tpl.htm @@ -27,7 +27,7 @@ <div class="row" style="margin: auto; width:100%;"> <div class="col-md-4 col-md-offset-4"> <div class="panel panel-default"> - <div class="panel-heading" style="background: linear-gradient(to bottom, white, #eef0f2);"> + <div class="panel-heading" style="background: linear-gradient(to bottom, white, #eef0f2);text-align:center;"> <img src="{tmpl_var name='base64_logo_txt'}"> </div> <div class="panel-body"> @@ -41,7 +41,7 @@ <script type="text/javascript" src="../js/jquery.min.js"></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/bootstrap-datetimepicker.min.js'></script> - <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.min.js'></script> + <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/ispconfig.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/modernizr.custom.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/pushy.min.js'></script> <script src='../themes/<tmpl_var name='current_theme'>/assets/javascripts/responsive.min.js'></script> diff --git a/interface/web/tools/lib/lang/ar_usersettings.lng b/interface/web/tools/lib/lang/ar_usersettings.lng index a1f3bd2ab93ccccca67f0becfd7263c25bb02cdb..4ac506ab77c1d084eb975ff864fabc0ffb2ddfd7 100644 --- a/interface/web/tools/lib/lang/ar_usersettings.lng +++ b/interface/web/tools/lib/lang/ar_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Password'; +$wb['password_txt'] = 'Password'; $wb['password_strength_txt'] = 'Password strength'; $wb['language_txt'] = 'Language'; $wb['password_mismatch'] = 'The password in the second password field does not match the first password.'; diff --git a/interface/web/tools/lib/lang/bg_usersettings.lng b/interface/web/tools/lib/lang/bg_usersettings.lng index b8e6a8695da35c795800426bfba7de7c7d3ced49..838053f5637682cf67fa9987a58e896ac325c5f4 100644 --- a/interface/web/tools/lib/lang/bg_usersettings.lng +++ b/interface/web/tools/lib/lang/bg_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Парола'; +$wb['password_txt'] = 'Парола'; $wb['password_strength_txt'] = 'Сила на паролата'; $wb['language_txt'] = 'Език'; $wb['password_mismatch'] = 'Паролите в двете полета не Ñъвпадат.'; diff --git a/interface/web/tools/lib/lang/br_usersettings.lng b/interface/web/tools/lib/lang/br_usersettings.lng index cf4242dc4abef5bf9e8cd765d1d070f29eba0d28..41de1002fe2e16bec2f485bbbb6952af3781e4fc 100644 --- a/interface/web/tools/lib/lang/br_usersettings.lng +++ b/interface/web/tools/lib/lang/br_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Senha'; +$wb['password_txt'] = 'Senha'; $wb['password_strength_txt'] = 'Segurança de Senha'; $wb['language_txt'] = 'Idioma'; $wb['password_mismatch'] = 'As senhas não conhecidem'; diff --git a/interface/web/tools/lib/lang/ca_usersettings.lng b/interface/web/tools/lib/lang/ca_usersettings.lng index 85c8e7547337ed023cccd2a8de52a6d9570d052f..fa40272aa08c094150913e5a3194e2cda2356128 100644 --- a/interface/web/tools/lib/lang/ca_usersettings.lng +++ b/interface/web/tools/lib/lang/ca_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Mot de passe'; +$wb['password_txt'] = 'Mot de passe'; $wb['password_strength_txt'] = 'Force du mot de passe'; $wb['language_txt'] = 'Langue'; $wb['password_mismatch'] = 'Le mot de passe de confirmation ne correspond avec le premier.'; diff --git a/interface/web/tools/lib/lang/cz_usersettings.lng b/interface/web/tools/lib/lang/cz_usersettings.lng index dec46b7a06de801c358648cd73bdb30c8370e482..98dd4ed8e7a09f4210a6ad8694d030bb24ed6962 100644 --- a/interface/web/tools/lib/lang/cz_usersettings.lng +++ b/interface/web/tools/lib/lang/cz_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Heslo'; +$wb['password_txt'] = 'Heslo'; $wb['password_strength_txt'] = 'BezpeÄnost hesla'; $wb['language_txt'] = 'Jazyk'; $wb['password_mismatch'] = 'Hesla se neshodujÃ.'; diff --git a/interface/web/tools/lib/lang/de_usersettings.lng b/interface/web/tools/lib/lang/de_usersettings.lng index 908bbf6d5bfbf698ff9fd1aee3e931658f7a050b..c643d38ff4e49bd5ba909380cf4af702715de985 100644 --- a/interface/web/tools/lib/lang/de_usersettings.lng +++ b/interface/web/tools/lib/lang/de_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Passwort'; +$wb['password_txt'] = 'Passwort'; $wb['language_txt'] = 'Sprache'; $wb['password_mismatch'] = 'Die Passwörter stimmen nicht überein.'; $wb['password_strength_txt'] = 'Passwortkomplexität'; diff --git a/interface/web/tools/lib/lang/el_usersettings.lng b/interface/web/tools/lib/lang/el_usersettings.lng index d2321b04bc134fd130c2ea462d88ec726b4de7e8..57e8bcb17a2b7dfc6677e58efbda065b480fd12a 100644 --- a/interface/web/tools/lib/lang/el_usersettings.lng +++ b/interface/web/tools/lib/lang/el_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Συνθηματικό'; +$wb['password_txt'] = 'Συνθηματικό'; $wb['password_strength_txt'] = 'ΔÏναμη συνθηματικοÏ'; $wb['language_txt'] = 'Γλώσσα'; $wb['password_mismatch'] = 'Το συνθηματικό στο δεÏτεÏο πεδίο δεν ταιÏιάζει με το συνθηματικό στο Ï€Ïώτο πεδίο.'; diff --git a/interface/web/tools/lib/lang/en_usersettings.lng b/interface/web/tools/lib/lang/en_usersettings.lng index efbe6c38dffac041966b89664c396bfffa61c209..e88232105895c365a78182c271583ead17559c44 100644 --- a/interface/web/tools/lib/lang/en_usersettings.lng +++ b/interface/web/tools/lib/lang/en_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb["passwort_txt"] = 'Password'; +$wb["password_txt"] = 'Password'; $wb["password_strength_txt"] = 'Password strength'; $wb["language_txt"] = 'Language'; $wb["password_mismatch"] = 'The password in the second password field does not match the first password.'; diff --git a/interface/web/tools/lib/lang/es_usersettings.lng b/interface/web/tools/lib/lang/es_usersettings.lng index c9bc3dbf84b123319ac54f10ee6884b5dbb14f28..9b2de57bfbd3bcf118bddf3f7113d9f57a47812b 100644 --- a/interface/web/tools/lib/lang/es_usersettings.lng +++ b/interface/web/tools/lib/lang/es_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Contraseña'; +$wb['password_txt'] = 'Contraseña'; $wb['password_strength_txt'] = 'Fortaleza de la contraseña'; $wb['language_txt'] = 'Idioma'; $wb['password_mismatch'] = 'La contraseña del primer y segundo campo no coinciden.'; diff --git a/interface/web/tools/lib/lang/fi_usersettings.lng b/interface/web/tools/lib/lang/fi_usersettings.lng index c869888d7de6d41c30ac1a6d5bb75b1fd5e5c263..8267c8117a57f1969b107d87d015a5c53bd6773d 100755 --- a/interface/web/tools/lib/lang/fi_usersettings.lng +++ b/interface/web/tools/lib/lang/fi_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Salasana'; +$wb['password_txt'] = 'Salasana'; $wb['language_txt'] = 'Kieli'; $wb['password_mismatch'] = 'Salasanat eivät täsmää.'; $wb['password_strength_txt'] = 'Salasanan vahvuus'; diff --git a/interface/web/tools/lib/lang/fr_usersettings.lng b/interface/web/tools/lib/lang/fr_usersettings.lng index fda69f9c7619cca5df60048857793b9d1f498362..c93a2443c4a5d4ef70895cc12174020adaf9963f 100644 --- a/interface/web/tools/lib/lang/fr_usersettings.lng +++ b/interface/web/tools/lib/lang/fr_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Mot de passe'; +$wb['password_txt'] = 'Mot de passe'; $wb['password_strength_txt'] = 'Force du mot de passe'; $wb['language_txt'] = 'Langue'; $wb['password_mismatch'] = 'Le mot de passe de confirmation ne correspond avec le premier.'; diff --git a/interface/web/tools/lib/lang/hr_usersettings.lng b/interface/web/tools/lib/lang/hr_usersettings.lng index 64b33d5923165125f255a75419c61f27be7d6d62..50759d4883abbc64344f6b8bc4afa9e73fff949a 100644 --- a/interface/web/tools/lib/lang/hr_usersettings.lng +++ b/interface/web/tools/lib/lang/hr_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Å ifra'; +$wb['password_txt'] = 'Å ifra'; $wb['password_strength_txt'] = 'JaÄina Å¡ifre'; $wb['language_txt'] = 'Jezik'; $wb['password_mismatch'] = 'Å ifra u drugom polju ne odgovara Å¡ifri iz prvog polja.'; diff --git a/interface/web/tools/lib/lang/hu_usersettings.lng b/interface/web/tools/lib/lang/hu_usersettings.lng index 51fe50ec0cd146ab1751f1e6eb52e751a1f371bf..49aa75537fc06fa9fd9aaef184b5e16aa5408efd 100644 --- a/interface/web/tools/lib/lang/hu_usersettings.lng +++ b/interface/web/tools/lib/lang/hu_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Jelszó'; +$wb['password_txt'] = 'Jelszó'; $wb['language_txt'] = 'Nyelv'; $wb['password_mismatch'] = 'Jelszavak nem egyeznek meg.'; $wb['Form to edit the user password and language.'] = 'Jelszó, nyelv és hitelesÃtés beállÃtó oldal.'; diff --git a/interface/web/tools/lib/lang/id_usersettings.lng b/interface/web/tools/lib/lang/id_usersettings.lng index 19ecb549b48e7d483f24d0c13bbafee18ee618ef..7b1bc225cad5a6e8d3631332e983cd88e92f5179 100644 --- a/interface/web/tools/lib/lang/id_usersettings.lng +++ b/interface/web/tools/lib/lang/id_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Kata Sandi'; +$wb['password_txt'] = 'Kata Sandi'; $wb['password_strength_txt'] = 'Kekuatan Sandi'; $wb['language_txt'] = 'Bahasa'; $wb['password_mismatch'] = 'Kata sandi di kolom kata sandi kedua tidak cocok dengan kata sandi pertama.'; diff --git a/interface/web/tools/lib/lang/it_usersettings.lng b/interface/web/tools/lib/lang/it_usersettings.lng index 6e671a3bb4c164d9c84bf750a2dd815e2f67f6a3..e75e8d28d2cf550d1893d81053c910d87584e7a3 100644 --- a/interface/web/tools/lib/lang/it_usersettings.lng +++ b/interface/web/tools/lib/lang/it_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Password'; +$wb['password_txt'] = 'Password'; $wb['language_txt'] = 'Lingua'; $wb['password_mismatch'] = 'Il secondo campo password non corrisponde con il primo.'; $wb['Form to edit the user password and language.'] = 'Form per modificare la password e la lingua dellutente.'; diff --git a/interface/web/tools/lib/lang/ja_usersettings.lng b/interface/web/tools/lib/lang/ja_usersettings.lng index e4b4a4ceab96e0c57006a8605903c178476d49f0..443a4510543f83ab235d1e0dcf57a1f4770f5576 100644 --- a/interface/web/tools/lib/lang/ja_usersettings.lng +++ b/interface/web/tools/lib/lang/ja_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'パスワード'; +$wb['password_txt'] = 'パスワード'; $wb['password_strength_txt'] = 'パスワードã®å¼·åº¦'; $wb['language_txt'] = '言語'; $wb['password_mismatch'] = 'パスワードã®1ã¤ã‚ã®æ¬„ã¨2ã¤ã‚ã®æ¬„ãŒä¸€è‡´ã—ã¦ã„ã¾ã›ã‚“。'; diff --git a/interface/web/tools/lib/lang/nl_usersettings.lng b/interface/web/tools/lib/lang/nl_usersettings.lng index ec8be959bcee3132f0fa07699007316ba2519a2c..0a95f7ffa9024dfff4d9db8168f76769a6df4792 100644 --- a/interface/web/tools/lib/lang/nl_usersettings.lng +++ b/interface/web/tools/lib/lang/nl_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Wachtwoord'; +$wb['password_txt'] = 'Wachtwoord'; $wb['password_strength_txt'] = 'Wachtwoord sterkte'; $wb['language_txt'] = 'Taal'; $wb['password_mismatch'] = 'De door u ingevulde wachtwoorden komen niet overeen.'; diff --git a/interface/web/tools/lib/lang/pl_usersettings.lng b/interface/web/tools/lib/lang/pl_usersettings.lng index addd42b34e00fa063ab44b4d20c4d85910a19c91..45081f681b6fce1de43062dd7602f154a15a5821 100644 --- a/interface/web/tools/lib/lang/pl_usersettings.lng +++ b/interface/web/tools/lib/lang/pl_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'HasÅ‚o'; +$wb['password_txt'] = 'HasÅ‚o'; $wb['password_strength_txt'] = 'SiÅ‚a hasÅ‚a'; $wb['language_txt'] = 'JÄ™zyk'; $wb['password_mismatch'] = 'HasÅ‚a nie pasujÄ… do siebie.'; diff --git a/interface/web/tools/lib/lang/pt_usersettings.lng b/interface/web/tools/lib/lang/pt_usersettings.lng index b622c664878a7ec7ee5ac73a4a18b8de7d1da062..81fd824d303c8845fbe31e5110d226738fbcaad8 100644 --- a/interface/web/tools/lib/lang/pt_usersettings.lng +++ b/interface/web/tools/lib/lang/pt_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Senha'; +$wb['password_txt'] = 'Senha'; $wb['password_strength_txt'] = 'Segurança de Senha'; $wb['language_txt'] = 'Idioma'; $wb['password_mismatch'] = 'As senhas não coincidem'; diff --git a/interface/web/tools/lib/lang/ro_usersettings.lng b/interface/web/tools/lib/lang/ro_usersettings.lng index c0d3724598f5eea5bdf6f43eaa18b83c42f62916..fae890fab609e6801b5e57f2de2e5059b37b1f50 100644 --- a/interface/web/tools/lib/lang/ro_usersettings.lng +++ b/interface/web/tools/lib/lang/ro_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Password'; +$wb['password_txt'] = 'Password'; $wb['password_strength_txt'] = 'Password strength'; $wb['language_txt'] = 'Limba'; $wb['password_mismatch'] = 'Parola in al doilea camp nu coincide cu primul.'; diff --git a/interface/web/tools/lib/lang/ru_usersettings.lng b/interface/web/tools/lib/lang/ru_usersettings.lng index a26c04831e070be6824b896c755bfaf6ba92d185..ba6784d8bd3ba73c47bd8f90e46028b54a97799d 100644 --- a/interface/web/tools/lib/lang/ru_usersettings.lng +++ b/interface/web/tools/lib/lang/ru_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Пароль'; +$wb['password_txt'] = 'Пароль'; $wb['password_strength_txt'] = 'СложноÑÑ‚ÑŒ паролÑ'; $wb['language_txt'] = 'Язык'; $wb['password_mismatch'] = 'Введенные пароли не Ñовпадают.'; diff --git a/interface/web/tools/lib/lang/se_usersettings.lng b/interface/web/tools/lib/lang/se_usersettings.lng index f7e05e913cf5ddd0554dcf00f332ea7eec845e11..4461fff4968b7df639c080a81b5e9ddf6cb4113d 100644 --- a/interface/web/tools/lib/lang/se_usersettings.lng +++ b/interface/web/tools/lib/lang/se_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Lösenord'; +$wb['password_txt'] = 'Lösenord'; $wb['password_strength_txt'] = 'Lösenordsstyrka'; $wb['language_txt'] = 'SprÃ¥k'; $wb['password_mismatch'] = 'The password in the second password field does not match the first password.'; diff --git a/interface/web/tools/lib/lang/sk_usersettings.lng b/interface/web/tools/lib/lang/sk_usersettings.lng index 5545950890810e5bad1bb4e1ffab742ba8ec073a..4c8bcb900e742c83a7b65aa4c29293be8f866f1a 100644 --- a/interface/web/tools/lib/lang/sk_usersettings.lng +++ b/interface/web/tools/lib/lang/sk_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Heslo'; +$wb['password_txt'] = 'Heslo'; $wb['password_strength_txt'] = 'PevnosÅ¥ hesla'; $wb['language_txt'] = 'Jazyk'; $wb['password_mismatch'] = 'Heslo v overovacom poli nezodpovedá prvému heslu.'; diff --git a/interface/web/tools/lib/lang/tr_usersettings.lng b/interface/web/tools/lib/lang/tr_usersettings.lng index ce7770c8fd44955a323ba1664a670a8bdc89cf19..cfc5a0dc231cfe28738bc5a8974e1a833a297d5d 100644 --- a/interface/web/tools/lib/lang/tr_usersettings.lng +++ b/interface/web/tools/lib/lang/tr_usersettings.lng @@ -1,5 +1,5 @@ <?php -$wb['passwort_txt'] = 'Parola'; +$wb['password_txt'] = 'Parola'; $wb['password_strength_txt'] = 'Parola Güçlüğü'; $wb['language_txt'] = 'Dil'; $wb['password_mismatch'] = 'Parola ile onayı aynı deÄŸil.'; diff --git a/interface/web/tools/templates/import_ispconfig.htm b/interface/web/tools/templates/import_ispconfig.htm index 83d79e671fc9888d33ad56cb6550d6db62e501c8..1d63df2a6d2152e9f365f01b13b858dfd6459b3f 100644 --- a/interface/web/tools/templates/import_ispconfig.htm +++ b/interface/web/tools/templates/import_ispconfig.htm @@ -3,15 +3,13 @@ </div> <p><tmpl_var name="list_desc_txt"></p> -<div class="panel panel_language_import"> +<div class="panel panel_language_import" style="padding:20px;"> <div class="pnl_formsarea"> <legend>{tmpl_var name="legend_txt"}</legend> <div class="form-group"> <label class="col-sm-3 control-label">Remote API URL</label> - <div class="col-sm-9"> - <div class="col-sm-6"><input class="form-control" type="text" id="remote_server" value="{tmpl_var name='remote_server'}" name="remote_server" /></div><div class="col-sm-3 input-sm"> (e.g. https://www.example.com:8080/remote/ ) - </div></div> + <div class="col-sm-9"><input class="form-control" type="text" id="remote_server" value="{tmpl_var name='remote_server'}" placeholder="https://www.example.com:8080/remote/" name="remote_server" /></div> </div> <div class="form-group"> <label class="col-sm-3 control-label">Remote User</label> diff --git a/interface/web/vm/list/openvz_ip.list.php b/interface/web/vm/list/openvz_ip.list.php index 9184aa7fafcf06bdd1bbdb62975c5b4aa336e8ac..77a52dbcf956eb04d5d60f82910f92c5193a8742 100644 --- a/interface/web/vm/list/openvz_ip.list.php +++ b/interface/web/vm/list/openvz_ip.list.php @@ -91,7 +91,7 @@ $liste["item"][] = array( 'field' => "reserved", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); diff --git a/interface/web/vm/list/openvz_ostemplate.list.php b/interface/web/vm/list/openvz_ostemplate.list.php index cf490559fd50cab362325894570f0ced6a346a87..ca6132d827726321b6ebde6ef5e9c14db776dfa4 100644 --- a/interface/web/vm/list/openvz_ostemplate.list.php +++ b/interface/web/vm/list/openvz_ostemplate.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "ostemplate_id", 'datatype' => "INTEGER", @@ -96,7 +96,7 @@ $liste["item"][] = array( 'field' => "allservers", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); diff --git a/interface/web/vm/list/openvz_template.list.php b/interface/web/vm/list/openvz_template.list.php index 6ba7faf4004af07c0a8a5f15680e4ce02155b5ba..e87314e98e4efac02b3e96ab664995872cbedfff 100644 --- a/interface/web/vm/list/openvz_template.list.php +++ b/interface/web/vm/list/openvz_template.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "template_name", diff --git a/interface/web/vm/list/openvz_vm.list.php b/interface/web/vm/list/openvz_vm.list.php index ad490edc4a79e082212c04df20aa47fc75fa6552..51e23b3ab2b0deaaf2d7604c3e392603db55397b 100644 --- a/interface/web/vm/list/openvz_vm.list.php +++ b/interface/web/vm/list/openvz_vm.list.php @@ -54,7 +54,7 @@ $liste["item"][] = array( 'field' => "active", 'prefix' => "", 'suffix' => "", 'width' => "", - 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>Yes</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>No</span></div>")); + 'value' => array('y' => "<div id=\"ir-Yes\" class=\"swap\"><span>".$app->lng('yes_txt')."</span></div>", 'n' => "<div class=\"swap\" id=\"ir-No\"><span>".$app->lng('no_txt')."</span></div>")); $liste["item"][] = array( 'field' => "veid", 'datatype' => "VARCHAR", diff --git a/server/conf/vhost.conf.master b/server/conf/vhost.conf.master index 66b46088065ac6e6dc4cac940fd9e05abfd35511..bb2d71d7d51976e4bb61306fd53ac1e6b428b4c9 100644 --- a/server/conf/vhost.conf.master +++ b/server/conf/vhost.conf.master @@ -350,15 +350,20 @@ Action php5-fcgi /php5-fcgi virtual Alias /php5-fcgi {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} <tmpl_if name='use_tcp'> - FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization - <IfModule mod_proxy_fcgi.c> - ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:<tmpl_var name='fpm_port'><tmpl_var name='web_document_root'>/$1 - </IfModule> + FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -host 127.0.0.1:<tmpl_var name='fpm_port'> -pass-header Authorization </tmpl_if> <tmpl_if name='use_socket'> FastCgiExternalServer {tmpl_var name='document_root'}/cgi-bin/php5-fcgi-{tmpl_var name='ip_address'}-{tmpl_var name='port'}-{tmpl_var name='domain'} -idle-timeout 300 -socket <tmpl_var name='fpm_socket'> -pass-header Authorization </tmpl_if> </IfModule> + <IfModule mod_proxy_fcgi.c> +<tmpl_if name='use_tcp'> + ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ fcgi://127.0.0.1:<tmpl_var name='fpm_port'><tmpl_var name='web_document_root'>/$1 +</tmpl_if> +<tmpl_if name='use_socket'> + ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix://<tmpl_var name='fpm_socket'>|fcgi://localhost/<tmpl_var name='web_document_root'>/$1 +</tmpl_if> + </IfModule> </tmpl_if> <tmpl_if name='php' op='==' value='hhvm'> @@ -396,7 +401,6 @@ <tmpl_if name="rewrite_enabled"> RewriteEngine on <tmpl_if name='apache_version' op='>' value='2.2' format='version'> - RewriteEngine on RewriteCond %{REQUEST_URI} ^/\.well-known/acme-challenge/ RewriteRule ^ - [END] </tmpl_if> diff --git a/server/cron.php b/server/cron.php index c197da9516a8d73cc75c44f818be4449a34f2757..58d48ec9dedbb0bdf7e0b4310f4091ead2ae9509 100644 --- a/server/cron.php +++ b/server/cron.php @@ -30,6 +30,26 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. define('SCRIPT_PATH', dirname($_SERVER["SCRIPT_FILENAME"])); require SCRIPT_PATH."/lib/config.inc.php"; + +// Check whether another instance of this script is already running +if (is_file($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock')) { + clearstatcache(); + $pid = trim(file_get_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock')); + if(preg_match('/^[0-9]+$/', $pid)) { + if(file_exists('/proc/' . $pid)) { + print @date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid ' . $pid . '.' . "\n"; + exit; + } + } + print @date('d.m.Y-H:i').' - WARNING - There is already a lockfile set, but no process running with this pid (' . $pid . '). Continuing.' . "\n"; +} + +// Set Lockfile +@file_put_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock', getmypid()); + +if($conf['log_priority'] <= LOGLEVEL_DEBUG) print 'Set Lock: ' . $conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock' . "\n"; + + require SCRIPT_PATH."/lib/app.inc.php"; set_time_limit(0); @@ -85,6 +105,10 @@ foreach($files as $f) { } unset($files); +// Remove lock +@unlink($conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock'); +$app->log('Remove Lock: ' . $conf['temppath'] . $conf['fs_div'] . '.ispconfig_cron_lock', LOGLEVEL_DEBUG); + die("finished.\n"); ?> diff --git a/server/lib/classes/cron.d/500-backup_mail.inc.php b/server/lib/classes/cron.d/500-backup_mail.inc.php index 04a4249f50d0034a80e8201321a78c5176e86fdc..2eacaed737555718fe4df84a390d923fbb653666 100644 --- a/server/lib/classes/cron.d/500-backup_mail.inc.php +++ b/server/lib/classes/cron.d/500-backup_mail.inc.php @@ -176,7 +176,7 @@ class cronjob_backup_mail extends cronjob { $dir_handle = dir($mail_backup_dir); $files = array(); while (false !== ($entry = $dir_handle->read())) { - if($entry != '.' && $entry != '..' && substr($entry,0,4+strlen($rec['mailuser_id'])) == 'mail'.$rec['mailuser_id'] && is_file($mail_backup_dir.'/'.$entry)) { + if($entry != '.' && $entry != '..' && substr($entry,0,5+strlen($rec['mailuser_id'])) == 'mail'.$rec['mailuser_id'].'_' && is_file($mail_backup_dir.'/'.$entry)) { $files[] = $entry; } } diff --git a/server/lib/classes/db_mysql.inc.php b/server/lib/classes/db_mysql.inc.php index 7c468201206de3135332e63fb8d6702e144e89dd..64ba44ebae2b4a7a1b2d48c417864a57edea8ea1 100644 --- a/server/lib/classes/db_mysql.inc.php +++ b/server/lib/classes/db_mysql.inc.php @@ -87,12 +87,12 @@ class db extends mysqli if(!is_object($this->_iConnId) || mysqli_connect_error()) { $this->_iConnId = null; - $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!'); + $this->_sqlerror('Zugriff auf Datenbankserver fehlgeschlagen! / Database server not accessible!', '', true); return false; } if(!((bool)mysqli_query( $this->_iConnId, 'USE `' . $this->dbName . '`'))) { $this->close(); - $this->_sqlerror('Datenbank nicht gefunden / Database not found'); + $this->_sqlerror('Datenbank nicht gefunden / Database not found', '', true); return false; } @@ -210,7 +210,7 @@ class db extends mysqli } if($try > 9) { - $this->_sqlerror('DB::query -> reconnect'); + $this->_sqlerror('DB::query -> reconnect', '', true); return false; } else { sleep(($try > 7 ? 5 : 1)); @@ -464,7 +464,7 @@ class db extends mysqli * * @access private */ - private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '') { + private function _sqlerror($sErrormsg = 'Unbekannter Fehler', $sAddMsg = '', $bNoLog = false) { global $app, $conf; $mysql_error = (is_object($this->_iConnId) ? mysqli_error($this->_iConnId) : mysqli_connect_error()); @@ -475,9 +475,11 @@ class db extends mysqli if($this->show_error_messages && $conf['demo_mode'] === false) { echo $sErrormsg . $sAddMsg; - } else if(is_object($app) && method_exists($app, 'log')) { - $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); - } + } elseif(is_object($app) && method_exists($app, 'log') && $bNoLog == false) { + $app->log($sErrormsg . $sAddMsg . ' -> ' . $mysql_errno . ' (' . $mysql_error . ')', LOGLEVEL_WARN); + } elseif(php_sapi_name() == 'cli') { + echo $sErrormsg . $sAddMsg; + } } public function affectedRows() { diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 93cd524162badfe608ba06637b70623d41c9d1b5..978a891b422f4fccad1cdf712867d467052bbfc7 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1803,7 +1803,9 @@ class system{ function mount_backup_dir($backup_dir, $mount_cmd = '/usr/local/ispconfig/server/scripts/backup_dir_mount.sh'){ global $app, $conf; - + + if($this->is_mounted($backup_dir)) return true; + $mounted = true; if ( is_file($mount_cmd) && is_executable($mount_cmd) && diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 676339934a3bc1fe4b5edcec1d0fdb758cb8504c..01362f5f731ad14d6fc6727938549f75db4d4ce3 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -36,6 +36,7 @@ class apache2_plugin { // private variables var $action = ''; var $ssl_certificate_changed = false; + var $update_letsencrypt = false; //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -504,6 +505,7 @@ class apache2_plugin { $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; + $this->update_letsencrypt = true; } // load the server configuration options @@ -1177,8 +1179,7 @@ class apache2_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain - || ($data['new']['type'] == 'subdomain') // we have new or update on subdomain - || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on aliasdomain + || $this->update_letsencrypt == true )) { // default values $temp_domains = array(); @@ -1230,13 +1231,15 @@ class apache2_plugin { $webroot = $data['new']['document_root']."/web"; //* check if we have already a Let's Encrypt cert - if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { + //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { + // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); $success = false; - $letsencrypt = array_shift( explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')) ); + $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); + $letsencrypt = reset($letsencrypt); if(is_executable($letsencrypt)) { - $success = $this->_exec($letsencrypt . " certonly --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); + $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); } if(!$success) { // error issuing cert @@ -1248,7 +1251,7 @@ class apache2_plugin { /* Update also the master-DB of the Server-Farm */ $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); } - } + //} //* check is been correctly created if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) { @@ -1494,7 +1497,7 @@ class apache2_plugin { if (count($rewrite_wildcard_rules) > 0) $rewrite_rules = array_merge($rewrite_rules, $rewrite_wildcard_rules); // Append wildcard rules to the end of rules - if(count($rewrite_rules) > 0 || $vhost_data['seo_redirect_enabled'] > 0 || count($alias_seo_redirects) > 0) { + if(count($rewrite_rules) > 0 || $vhost_data['seo_redirect_enabled'] > 0 || count($alias_seo_redirects) > 0 || $data['new']['rewrite_to_https'] == 'y') { $tpl->setVar('rewrite_enabled', 1); } else { $tpl->setVar('rewrite_enabled', 0); @@ -2102,6 +2105,19 @@ class apache2_plugin { //exec('fuser -km '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); } + + // remove letsencrypt if it exists (renew will always fail otherwise) + + $domain = $data['old']['ssl_domain']; + if(!$domain) $domain = $data['old']['domain']; + if(substr($domain, 0, 2) === '*.') { + // wildcard domain not yet supported by letsencrypt! + $domain = substr($domain, 2); + } + //$crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem"; + //$key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem"; + $le_conf_file = '/etc/letsencrypt/renewal/' . $domain . '.conf'; + @rename('/etc/letsencrypt/renewal/' . $domain . '.conf', '/etc/letsencrypt/renewal/' . $domain . '.conf~backup'); } //* remove mountpoint from fstab @@ -2123,6 +2139,7 @@ class apache2_plugin { $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; + $this->update_letsencrypt = true; // just run the update function $this->update($event_name, $data); diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 3e4fad6cb4e840d7f210b4c51483ab7da6fdb1a1..7ae4660abb416170c3120231d8549b9b04784004 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -87,6 +87,7 @@ class backup_plugin { if(file_exists($backup_dir.'/'.$backup['filename']) && file_exists($web['document_root'].'/backup/') && !stristr($backup_dir.'/'.$backup['filename'], '..') && !stristr($backup_dir.'/'.$backup['filename'], 'etc')) { copy($backup_dir.'/'.$backup['filename'], $web['document_root'].'/backup/'.$backup['filename']); chgrp($web['document_root'].'/backup/'.$backup['filename'], $web['system_group']); + chmod($web['document_root'].'/backup/'.$backup['filename'],0600); $app->log('cp '.$backup_dir.'/'.$backup['filename'].' '.$web['document_root'].'/backup/'.$backup['filename'], LOGLEVEL_DEBUG); } } diff --git a/server/plugins-available/maildeliver_plugin.inc.php b/server/plugins-available/maildeliver_plugin.inc.php index 35001a4cde867a46ffd1501a03797610564c3f65..2c16601f5024d8d74242b4fb25b29f43e13b918c 100644 --- a/server/plugins-available/maildeliver_plugin.inc.php +++ b/server/plugins-available/maildeliver_plugin.inc.php @@ -132,7 +132,7 @@ class maildeliver_plugin { // Custom filters if($data["new"]["custom_mailfilter"] == 'NULL') $data["new"]["custom_mailfilter"] = ''; - $tpl->setVar('custom_mailfilter', $data["new"]["custom_mailfilter"]); + $tpl->setVar('custom_mailfilter', str_replace("\r\n","\n",$data["new"]["custom_mailfilter"])); // Move junk $tpl->setVar('move_junk', $data["new"]["move_junk"]); diff --git a/server/plugins-available/maildrop_plugin.inc.php b/server/plugins-available/maildrop_plugin.inc.php index 1ebb677e4259ac341feb5044899d1dd738d0f9c5..2fefa26cfc95cfc697dc456278f136258543628b 100644 --- a/server/plugins-available/maildrop_plugin.inc.php +++ b/server/plugins-available/maildrop_plugin.inc.php @@ -211,7 +211,7 @@ class maildrop_plugin { $mailfilter_content .= file_get_contents($conf["rootpath"].'/conf/mailfilter_move_junk.master')."\n"; } } - $mailfilter_content .= $data["new"]["custom_mailfilter"]; + $mailfilter_content .= str_replace("\r\n","\n",$data["new"]["custom_mailfilter"]); // Replace windows linebreaks in mailfilter file $mailfilter_content = str_replace("\r\n", "\n", $mailfilter_content); diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index b2262b00d391b125bf1062af106175065d06e6eb..e65848797c0f9095a862bede5ca15869e2263941 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -36,6 +36,7 @@ class nginx_plugin { // private variables var $action = ''; var $ssl_certificate_changed = false; + var $update_letsencrypt = false; //* This function is called during ispconfig installation to determine // if a symlink shall be created for this plugin. @@ -354,6 +355,7 @@ class nginx_plugin { $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; + $this->update_letsencrypt = true; } // load the server configuration options @@ -1251,8 +1253,7 @@ class nginx_plugin { ($data['old']['ssl'] == 'n' || $data['old']['ssl_letsencrypt'] == 'n') // we have new let's encrypt configuration || ($data['old']['domain'] != $data['new']['domain']) // we have domain update || ($data['old']['subdomain'] != $data['new']['subdomain']) // we have new or update on "auto" subdomain - || ($data['new']['type'] == 'subdomain') // we have new or update on subdomain - || ($data['old']['type'] == 'alias' || $data['new']['type'] == 'alias') // we have new or update on alias domain + || $this->update_letsencrypt == true )) { // default values $temp_domains = array(); @@ -1309,13 +1310,15 @@ class nginx_plugin { $webroot = $data['new']['document_root']."/web"; //* check if we have already a Let's Encrypt cert - if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { + //if(!file_exists($crt_tmp_file) && !file_exists($key_tmp_file)) { + // we must not skip if cert exists, otherwise changed domains (alias or sub) won't make it to the cert $app->log("Create Let's Encrypt SSL Cert for: $domain", LOGLEVEL_DEBUG); $success = false; - $letsencrypt = array_shift( explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')) ); + $letsencrypt = explode("\n", shell_exec('which letsencrypt certbot /root/.local/share/letsencrypt/bin/letsencrypt')); + $letsencrypt = reset($letsencrypt); if(is_executable($letsencrypt)) { - $success = $this->_exec($letsencrypt . " certonly --text --agree-tos --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); + $success = $this->_exec($letsencrypt . " certonly -n --text --agree-tos --expand --authenticator webroot --server https://acme-v01.api.letsencrypt.org/directory --rsa-key-size 4096 --email postmaster@$domain --domains $lddomain --webroot-path /usr/local/ispconfig/interface/acme"); } if(!$success) { // error issuing cert @@ -1327,7 +1330,7 @@ class nginx_plugin { /* Update also the master-DB of the Server-Farm */ $app->dbmaster->query("UPDATE web_domain SET `ssl` = ?, `ssl_letsencrypt` = ? WHERE `domain` = ?", $data['new']['ssl'], 'n', $data['new']['domain']); } - } + //} //* check is been correctly created if(file_exists($crt_tmp_file) OR file_exists($key_tmp_file)) { @@ -2124,6 +2127,18 @@ class nginx_plugin { //exec('fuser -km '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); exec('umount '.escapeshellarg($data['old']['document_root'].'/'.$log_folder).' 2>/dev/null'); } + + // remove letsencrypt if it exists (renew will always fail otherwise) + $domain = $data['old']['ssl_domain']; + if(!$domain) $domain = $data['old']['domain']; + if(substr($domain, 0, 2) === '*.') { + // wildcard domain not yet supported by letsencrypt! + $domain = substr($domain, 2); + } + //$crt_tmp_file = "/etc/letsencrypt/live/".$domain."/cert.pem"; + //$key_tmp_file = "/etc/letsencrypt/live/".$domain."/privkey.pem"; + $le_conf_file = '/etc/letsencrypt/renewal/' . $domain . '.conf'; + @rename('/etc/letsencrypt/renewal/' . $domain . '.conf', '/etc/letsencrypt/renewal/' . $domain . '.conf~backup'); } //* remove mountpoint from fstab @@ -2145,6 +2160,7 @@ class nginx_plugin { $data['new'] = $tmp; $data['old'] = $tmp; $this->action = 'update'; + $this->update_letsencrypt = true; // just run the update function $this->update($event_name, $data); diff --git a/server/plugins-available/shelluser_jailkit_plugin.inc.php b/server/plugins-available/shelluser_jailkit_plugin.inc.php index 5645953bdf9c69454cf4c7d86e79e12dbab28e13..16dbcc7a67c4f50625e46009f30e4d0c6dca91cf 100755 --- a/server/plugins-available/shelluser_jailkit_plugin.inc.php +++ b/server/plugins-available/shelluser_jailkit_plugin.inc.php @@ -245,13 +245,17 @@ class shelluser_jailkit_plugin { //exec('rm -rf '.$data['old']['dir'].$jailkit_chroot_userhome); $app->system->web_folder_protection($web['document_root'], false); + + $userid = intval($app->system->getuid($data['old']['username'])); + $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; '; + $command .= 'userdel -f '.escapeshellcmd($data['old']['username']).' &> /dev/null'; + exec($command); + + // Remove the jailed user from passwd and shadow file inside the jail + $app->system->removeLine($data['old']['dir'].'/etc/passwd', $data['old']['username']); + $app->system->removeLine($data['old']['dir'].'/etc/shadow', $data['old']['username']); if(@is_dir($data['old']['dir'].$jailkit_chroot_userhome)) { - $userid = intval($app->system->getuid($data['old']['username'])); - $command = 'killall -u '.escapeshellcmd($data['old']['username']).' ; userdel -f'; - $command .= ' '.escapeshellcmd($data['old']['username']).' &> /dev/null'; - exec($command); - $this->_delete_homedir($data['old']['dir'].$jailkit_chroot_userhome,$userid,$data['old']['parent_domain_id']); $app->log("Jailkit Plugin -> delete chroot home:".$data['old']['dir'].$jailkit_chroot_userhome, LOGLEVEL_DEBUG); diff --git a/server/server.php b/server/server.php index 4479b147c5504ef304ce1beb3fc5d2a00c19c2c1..689cb174901017229d480e1f3dc920375303507a 100644 --- a/server/server.php +++ b/server/server.php @@ -29,6 +29,25 @@ define('SCRIPT_PATH', dirname($_SERVER["SCRIPT_FILENAME"])); require SCRIPT_PATH."/lib/config.inc.php"; + +// Check whether another instance of this script is already running +if (is_file($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock')) { + clearstatcache(); + $pid = trim(file_get_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock')); + if(preg_match('/^[0-9]+$/', $pid)) { + if(file_exists('/proc/' . $pid)) { + print @date('d.m.Y-H:i').' - WARNING - There is already an instance of server.php running with pid ' . $pid . '.' . "\n"; + exit; + } + } + print @date('d.m.Y-H:i').' - WARNING - There is already a lockfile set, but no process running with this pid (' . $pid . '). Continuing.' . "\n"; +} + +// Set Lockfile +@file_put_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock', getmypid()); + +if($conf['log_priority'] <= LOGLEVEL_DEBUG) print 'Set Lock: ' . $conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock' . "\n"; + require SCRIPT_PATH."/lib/app.inc.php"; $app->setCaller('server'); @@ -125,24 +144,6 @@ if ($app->dbmaster->connect_error == NULL) { unset($tmp); } - -// Check whether another instance of this script is already running -if (is_file($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock')) { - clearstatcache(); - $pid = trim(file_get_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock')); - if(preg_match('/^[0-9]+$/', $pid)) { - if(file_exists('/proc/' . $pid)) { - $app->log('There is already an instance of server.php running with pid ' . $pid . '.', LOGLEVEL_DEBUG); - exit; - } - } - $app->log('There is already a lockfile set, but no process running with this pid (' . $pid . '). Continuing.', LOGLEVEL_WARN); -} - -// Set Lockfile -@file_put_contents($conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock', getmypid()); -$app->log('Set Lock: ' . $conf['temppath'] . $conf['fs_div'] . '.ispconfig_lock', LOGLEVEL_DEBUG); - /** Do we need to start the core-modules */