Marius Cramer
2014-04-10 363ccfedb96d98cb6f03fd2ca44096dcb24c2c7f
Merge remote-tracking branch 'origin/stable-3.0.5'

Conflicts:
interface/lib/plugins/sites_web_vhost_subdomain_plugin.inc.php
interface/web/mail/lib/lang/de_mail_get.lng
interface/web/sites/lib/lang/de_cron.lng
interface/web/sites/lib/lang/en_cron.lng
interface/web/sites/web_vhost_subdomain_edit.php
1 files added
23 files modified
116 ■■■■■ changed files
install/lib/installer_base.lib.php 7 ●●●●● patch | view | raw | blame | history
install/lib/update.lib.php 4 ●●●● patch | view | raw | blame | history
install/sql/incremental/upd_0073.sql 4 ●●●● patch | view | raw | blame | history
install/sql/ispconfig3.sql 5 ●●●● patch | view | raw | blame | history
interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php 26 ●●●● patch | view | raw | blame | history
interface/web/client/client_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/client/domain_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_import.php 4 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_slave_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_soa_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_wizard.php 4 ●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_get.tform.php 2 ●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/de_mail_get.lng 3 ●●●● patch | view | raw | blame | history
interface/web/mail/lib/lang/en_mail_get.lng 1 ●●●● patch | view | raw | blame | history
interface/web/mail/mail_domain_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/mail/mail_mailinglist_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/mail/templates/mail_get_edit.htm 2 ●●● patch | view | raw | blame | history
interface/web/sites/cron_edit.php 14 ●●●● patch | view | raw | blame | history
interface/web/sites/database_user_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/de_cron.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/lib/lang/en_cron.lng 2 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_domain_edit.php 4 ●●●● patch | view | raw | blame | history
interface/web/vm/openvz_vm_edit.php 4 ●●●● patch | view | raw | blame | history
server/conf/php_fpm_pool.conf.master 2 ●●● patch | view | raw | blame | history
install/lib/installer_base.lib.php
@@ -2136,6 +2136,13 @@
        //* Remove Domain module as its functions are available in the client module now
        if(@is_dir('/usr/local/ispconfig/interface/web/domain')) exec('rm -rf /usr/local/ispconfig/interface/web/domain');
        //* Disable rkhunter run and update in debian cronjob as ispconfig is running and updating rkhunter
        if(is_file('/etc/default/rkhunter')) {
            replaceLine('/etc/default/rkhunter', 'CRON_DAILY_RUN="yes"', 'CRON_DAILY_RUN="no"', 1, 0);
            replaceLine('/etc/default/rkhunter', 'CRON_DB_UPDATE="yes"', 'CRON_DB_UPDATE="no"', 1, 0);
        }
    }
install/lib/update.lib.php
@@ -29,10 +29,10 @@
//* Installer patch stub class
class installer_patch_update {
    protected function onBeforeSQL() {
    public function onBeforeSQL() {
    }
    protected function onAfterSQL() {
    public function onAfterSQL() {
    }
}
install/sql/incremental/upd_0073.sql
New file
@@ -0,0 +1,4 @@
ALTER TABLE `client_template` ADD `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y' AFTER `limit_webdav_user`;
ALTER TABLE `client` ADD `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y' AFTER `limit_webdav_user`;
ALTER TABLE  `web_domain` CHANGE  `php_fpm_use_socket`  `php_fpm_use_socket` ENUM(  'n',  'y' ) NOT NULL DEFAULT  'y';
ALTER TABLE `mail_domain` ADD `dkim_selector` VARCHAR(63) NOT NULL DEFAULT 'default' AFTER `dkim`;
install/sql/ispconfig3.sql
@@ -204,6 +204,7 @@
  `limit_shell_user` int(11) NOT NULL DEFAULT '0',
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot',
  `limit_webdav_user` int(11) NOT NULL DEFAULT '0',
  `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y',
  `limit_aps` int(11) NOT NULL DEFAULT '-1',
  `default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
  `db_servers` blob NOT NULL,
@@ -313,6 +314,7 @@
  `limit_shell_user` int(11) NOT NULL default '0',
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no',
  `limit_webdav_user` int(11) NOT NULL default '0',
  `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y',
  `limit_aps` int(11) NOT NULL DEFAULT '-1',
  `limit_dns_zone` int(11) NOT NULL default '-1',
  `limit_dns_slave_zone` int(11) NOT NULL default '-1',
@@ -740,6 +742,7 @@
  `server_id` int(11) unsigned NOT NULL default '0',
  `domain` varchar(255) NOT NULL default '',
  `dkim` ENUM( 'n', 'y' ) NOT NULL default 'n',
  `dkim_selector` varchar(63) NOT NULL DEFAULT 'default',
  `dkim_private` mediumtext NULL,
  `dkim_public` mediumtext NULL,
  `active` enum('n','y') NOT NULL,
@@ -1852,7 +1855,7 @@
  `allow_override` varchar(255) NOT NULL default 'All',
  `apache_directives` mediumtext,
  `nginx_directives` mediumtext,
  `php_fpm_use_socket` ENUM('n','y') NOT NULL DEFAULT 'n',
  `php_fpm_use_socket` ENUM('n','y') NOT NULL DEFAULT 'y',
  `pm` enum('static','dynamic','ondemand') NOT NULL DEFAULT 'dynamic',
  `pm_max_children` int(11) NOT NULL DEFAULT '10',
  `pm_start_servers` int(11) NOT NULL DEFAULT '2',
interface/lib/plugins/sites_web_vhost_domain_plugin.inc.php
@@ -228,19 +228,21 @@
                $app->db->query($sql);
            }
        } else {
            $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($page_form->dataRecord['parent_domain_id']) . "'");
            if(isset($page_form->dataRecord["parent_domain_id"]) && $page_form->dataRecord["parent_domain_id"] != $page_form->oldDataRecord["parent_domain_id"]) {
                $parent_domain = $app->db->queryOneRecord("SELECT * FROM `web_domain` WHERE `domain_id` = '" . $app->functions->intval($page_form->dataRecord['parent_domain_id']) . "'");
            // Set the values for document_root, system_user and system_group
            $system_user = $app->db->quote($parent_domain['system_user']);
            $system_group = $app->db->quote($parent_domain['system_group']);
            $document_root = $app->db->quote($parent_domain['document_root']);
            $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$page_form->dataRecord['web_folder'], $web_config["php_open_basedir"]);
            $php_open_basedir = str_replace("[website_domain]/web", $page_form->dataRecord['domain'].'/'.$page_form->dataRecord['web_folder'], $php_open_basedir);
            $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
            $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir));
            $htaccess_allow_override = $app->db->quote($parent_domain['allow_override']);
            $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir'  WHERE domain_id = ".$page_form->id;
            $app->db->query($sql);
                // Set the values for document_root, system_user and system_group
                $system_user = $app->db->quote($parent_domain['system_user']);
                $system_group = $app->db->quote($parent_domain['system_group']);
                $document_root = $app->db->quote($parent_domain['document_root']);
                $php_open_basedir = str_replace("[website_path]/web", $document_root.'/'.$page_form->dataRecord['web_folder'], $web_config["php_open_basedir"]);
                $php_open_basedir = str_replace("[website_domain]/web", $page_form->dataRecord['domain'].'/'.$page_form->dataRecord['web_folder'], $php_open_basedir);
                $php_open_basedir = str_replace("[website_path]", $document_root, $php_open_basedir);
                $php_open_basedir = $app->db->quote(str_replace("[website_domain]", $page_form->dataRecord['domain'], $php_open_basedir));
                $htaccess_allow_override = $app->db->quote($parent_domain['allow_override']);
                $sql = "UPDATE web_domain SET sys_groupid = ".$app->functions->intval($parent_domain['sys_groupid']).",system_user = '$system_user', system_group = '$system_group', document_root = '$document_root', allow_override = '$htaccess_allow_override', php_open_basedir = '$php_open_basedir'  WHERE domain_id = ".$page_form->id;
                $app->db->query($sql);
            }
        }
    }
interface/web/client/client_edit.php
@@ -223,7 +223,7 @@
        
        if($app->auth->is_admin()) {
            // Fill the client select field
            $sql = "SELECT client.client_id, sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 AND client.limit_client > 0 ORDER BY sys_group.name";
            $sql = "SELECT client.client_id, sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 AND client.limit_client > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = "<option value='0'>- ".$app->tform->lng('none_txt')." -</option>";
            //$tmp_data_record = $app->tform->getDataRecord($this->id);
interface/web/client/domain_edit.php
@@ -81,7 +81,7 @@
        if($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Getting Clients of the user
            //$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0 ORDER BY name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = '';
            if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -100,7 +100,7 @@
            $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
    
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY client.company_name, client.contact_name, sys_group.name";
            //die($sql);
            $records = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
interface/web/dns/dns_import.php
@@ -87,7 +87,7 @@
    $app->tpl->setVar("server_id", $server_id_option);
    // load the list of clients
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
    $clients = $app->db->queryAllRecords($sql);
    $client_select = '';
    if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -109,7 +109,7 @@
    // load the list of clients
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".intval($client['client_id']);
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
    $clients = $app->db->queryAllRecords($sql);
    $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".intval($client['client_id']));
    $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/dns/dns_slave_edit.php
@@ -72,7 +72,7 @@
        // If user is admin, we will allow him to select to whom this record belongs
        if($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Getting Domains of the user
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = '';
            if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -91,7 +91,7 @@
                $client = $app->db->queryOneRecord("SELECT client.client_id, sys_group.name, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
                // Fill the client select field
                $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
                $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY client.company_name, client.contact_name, sys_group.name";
                $clients = $app->db->queryAllRecords($sql);
                $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
                $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/dns/dns_soa_edit.php
@@ -82,7 +82,7 @@
        // If user is admin, we will allow him to select to whom this record belongs
        if($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Getting Domains of the user
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = '';
            if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -101,7 +101,7 @@
                $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
                // Fill the client select field
                $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
                $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY client.company_name, client.contact_name, sys_group.name";
                $clients = $app->db->queryAllRecords($sql);
                $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$client['client_id']);
                $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/dns/dns_wizard.php
@@ -83,7 +83,7 @@
    $app->tpl->setVar("server_id", $server_id_option);
    // load the list of clients
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
    $clients = $app->db->queryAllRecords($sql);
    $client_select = '';
    if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -105,7 +105,7 @@
    // load the list of clients
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id']);
    $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
    $clients = $app->db->queryAllRecords($sql);
    $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
    $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/mail/form/mail_get.tform.php
@@ -129,7 +129,7 @@
        'source_delete' => array (
            'datatype' => 'VARCHAR',
            'formtype' => 'CHECKBOX',
            'default' => 'y',
            'default' => 'n',
            'value'  => array(0 => 'n', 1 => 'y')
        ),
        'source_read_all' => array (
interface/web/mail/lib/lang/de_mail_get.lng
@@ -5,6 +5,7 @@
$wb['source_username_txt'] = 'Benutzername';
$wb['source_password_txt'] = 'Passwort';
$wb['source_delete_txt'] = 'E-Mails nach Empfang löschen';
$wb["source_delete_note_txt"] = 'Bitte prüfen Sie erst, ob das Abholen funktioniert, bevor Sie diese Option aktivieren.';
$wb['destination_txt'] = 'Ziel';
$wb['active_txt'] = 'Aktiv';
$wb['limit_fetchmail_txt'] = 'Die maximale Anzahl an Sammelkonto Einträgen für Ihr Konto wurde erreicht.';
@@ -14,5 +15,5 @@
$wb['destination_error_isemail'] = 'Kein Ziel gewählt.';
$wb['source_server_error_regex'] = 'POP3/IMAP Server ist kein gültiger Domainname.';
$wb['source_read_all_txt'] = 'Alle E-Mails abrufen (inkl. bereits gelesene E-Mails)';
$wb['error_delete_read_all_combination'] = 'Unzulässige Kombination von Optionen. Sie können \"E-Mails nach Empfang löschen\" = nein nicht zusammen mit \"Alle E-Mails abrufen (inkl. bereits gelesene E-Mails)\" = ja benutzen.';
$wb['error_delete_read_all_combination'] = 'Unzulässige Kombination von Optionen. Sie können: E-Mails nach Empfang löschen = nein nicht zusammen mit: Alle E-Mails abrufen (inkl. bereits gelesene E-Mails) = ja benutzen.';
?>
interface/web/mail/lib/lang/en_mail_get.lng
@@ -5,6 +5,7 @@
$wb["source_username_txt"] = 'Username';
$wb["source_password_txt"] = 'Password';
$wb["source_delete_txt"] = 'Delete emails after retrieval';
$wb["source_delete_note_txt"] = 'Please check first if email retrieval works, before you activate this option.';
$wb["source_read_all_txt"] = 'Retrieve all emails (incl. read mails)';
$wb["destination_txt"] = 'Destination';
$wb["active_txt"] = 'Active';
interface/web/mail/mail_domain_edit.php
@@ -71,7 +71,7 @@
        if($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Getting Clients of the user
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = '';
@@ -97,7 +97,7 @@
            unset($tmp);
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
            $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/mail/mail_mailinglist_edit.php
@@ -72,7 +72,7 @@
        if($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Getting Clients of the user
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = '';
            if($_SESSION["s"]["user"]["typ"] == 'admin') $client_select .= "<option value='0'></option>";
@@ -92,7 +92,7 @@
            $client = $app->db->queryOneRecord("SELECT client.client_id, client.contact_name, client.default_mailserver, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname, sys_group.name FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id order by contact_name");
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".intval($client['client_id'])." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".intval($client['client_id']));
            $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
interface/web/mail/templates/mail_get_edit.htm
@@ -26,7 +26,7 @@
            <div class="ctrlHolder">
                <p class="label">{tmpl_var name='source_delete_txt'}</p>
                <div class="multiField">
                    {tmpl_var name='source_delete'}
                    {tmpl_var name='source_delete'} {tmpl_var name="source_delete_note_txt"}
                </div>
            </div>
            <div class="ctrlHolder">
interface/web/sites/cron_edit.php
@@ -140,13 +140,18 @@
        if($_SESSION["s"]["user"]["typ"] != 'admin') {
            // Get the limits of the client
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT limit_cron_frequency FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            $client = $app->db->queryOneRecord("SELECT limit_cron_frequency, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            if($client["limit_cron_frequency"] > 1) {
                if($app->tform->cron_min_freq < $client["limit_cron_frequency"]) {
                    $app->error($app->tform->wordbook["limit_cron_frequency_txt"]);
                    $has_error = true;
                }
            }
            if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') {
                $app->error($app->tform->wordbook["limit_cron_url_txt"]);
                $has_error = true;
            }
        }
@@ -165,7 +170,7 @@
        if($_SESSION["s"]["user"]["typ"] != 'admin') {
            // Get the limits of the client
            $client_group_id = $app->functions->intval($_SESSION["s"]["user"]["default_group"]);
            $client = $app->db->queryOneRecord("SELECT limit_cron_frequency FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            $client = $app->db->queryOneRecord("SELECT limit_cron_frequency, limit_cron_type FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            if($client["limit_cron_frequency"] > 1) {
                if($app->tform->cron_min_freq < $client["limit_cron_frequency"]) {
@@ -173,6 +178,11 @@
                    $has_error = true;
                }
            }
            if($client["limit_cron_type"] == 'url' && $this->dataRecord["type"] != 'url') {
                $app->error($app->tform->wordbook["limit_cron_url_txt"]);
                $has_error = true;
            }
        }
        if($has_error == true) {
interface/web/sites/database_user_edit.php
@@ -69,7 +69,7 @@
            $client = $app->db->queryOneRecord("SELECT client.company_name, client.contact_name, client.client_id FROM sys_group, client WHERE sys_group.client_id = client.client_id and sys_group.groupid = $client_group_id");
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
            $records = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
            $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contact_name'].'</option>';
@@ -83,7 +83,7 @@
            $app->tpl->setVar("client_group_id", $client_select);
        } elseif($_SESSION["s"]["user"]["typ"] == 'admin') {
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = "<option value='0'></option>";
            //$tmp_data_record = $app->tform->getDataRecord($this->id);
interface/web/sites/lib/lang/de_cron.lng
@@ -21,4 +21,6 @@
$wb['server_id_error_empty'] = 'Die Server-ID ist leer.';
$wb['command_hint_txt'] = 'z. B. /var/www/clients/clientX/webY/myscript.sh oder http://www.mydomain.com/path/script.php. Der Platzhalter [web_root] wird durch /var/www/clients/clientX/webY/web ersetzt.';
$wb['log_output_txt'] = 'Ausgabe loggen';
$wb['limit_cron_url_txt'] = 'Es sind nur URL cronjobs möglich. Der Cron-Befehl muss mit http:// beginnen.';
$wb['command_error_empty'] = 'Befehl ist leer.';
?>
interface/web/sites/lib/lang/en_cron.lng
@@ -21,4 +21,6 @@
$wb['server_id_error_empty'] = 'The server ID is empty.';
$wb['command_hint_txt'] = 'e.g. /var/www/clients/clientX/webY/myscript.sh or http://www.mydomain.com/path/script.php, you can use [web_root] placeholder that is replaced by /var/www/clients/clientX/webY/web.';
$wb['log_output_txt'] = 'Log output';
$wb['limit_cron_url_txt'] = 'URL cron only. Please enter a URL starting with http:// as cron command.';
$wb['command_error_empty'] = 'Command is empty.';
?>
interface/web/sites/web_vhost_domain_edit.php
@@ -291,7 +291,7 @@
            unset($options_web_servers);
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$client['client_id']." ORDER BY client.company_name, client.contact_name, sys_group.name";
            $records = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
            $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
@@ -491,7 +491,7 @@
            unset($ips);
            // Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = "<option value='0'></option>";
            //$tmp_data_record = $app->tform->getDataRecord($this->id);
interface/web/vm/openvz_vm_edit.php
@@ -100,7 +100,7 @@
            //* Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND client.parent_client_id = ".$app->functions->intval($client['client_id'])." ORDER BY client.company_name, client.contact_name, sys_group.name";
            $records = $app->db->queryAllRecords($sql);
            $tmp = $app->db->queryOneRecord("SELECT groupid FROM sys_group WHERE client_id = ".$app->functions->intval($client['client_id']));
            $client_select = '<option value="'.$tmp['groupid'].'">'.$client['contactname'].'</option>';
@@ -132,7 +132,7 @@
        } else {
            //* Fill the client select field
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY sys_group.name";
            $sql = "SELECT sys_group.groupid, sys_group.name, CONCAT(IF(client.company_name != '', CONCAT(client.company_name, ' :: '), ''), client.contact_name, ' (', client.username, IF(client.customer_no != '', CONCAT(', ', client.customer_no), ''), ')') as contactname FROM sys_group, client WHERE sys_group.client_id = client.client_id AND sys_group.client_id > 0 ORDER BY client.company_name, client.contact_name, sys_group.name";
            $clients = $app->db->queryAllRecords($sql);
            $client_select = "<option value='0'></option>";
            //$tmp_data_record = $app->tform->getDataRecord($this->id);
server/conf/php_fpm_pool.conf.master
@@ -8,7 +8,7 @@
listen = <tmpl_var name='fpm_socket'>
listen.owner = <tmpl_var name='fpm_user'>
listen.group = <tmpl_var name='fpm_group'>
listen.mode = 0660
listen.mode = 0600
</tmpl_if>
user = <tmpl_var name='fpm_user'>