Till Brehm
2016-05-26 7de9c4d3213536399c1b4eb794f9e668f4084752
Issue #3872: Fixed syntax incompatibility with old PHP versions.
5 files modified
30 ■■■■■ changed files
interface/web/sites/database_quota_stats.php 4 ●●● patch | view | raw | blame | history
server/plugins-available/apache2_plugin.inc.php 6 ●●●● patch | view | raw | blame | history
server/plugins-available/cron_plugin.inc.php 6 ●●●● patch | view | raw | blame | history
server/plugins-available/mail_plugin.inc.php 8 ●●●● patch | view | raw | blame | history
server/plugins-available/nginx_plugin.inc.php 6 ●●●● patch | view | raw | blame | history
interface/web/sites/database_quota_stats.php
@@ -57,7 +57,9 @@
        if(!empty($monitor_data[$rec['server_id'].'.'.$database_name])){
            $rec['database'] = $monitor_data[$rec['server_id'].'.'.$database_name]['database_name'];
            $rec['client'] = $monitor_data[$rec['server_id'].'.'.$database_name]['client'];
            $rec['server_name'] = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $rec['server_id'])['server_name'];
            $tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $rec['server_id']);
            $rec['server_name'] = $tmp['server_name'];
            unset($tmp);
            $rec['used'] = $monitor_data[$rec['server_id'].'.'.$database_name]['used'];
            $rec['quota'] = $monitor_data[$rec['server_id'].'.'.$database_name]['quota'];
server/plugins-available/apache2_plugin.inc.php
@@ -882,9 +882,9 @@
            }
            
          // get the primitive folder for document_root and the filesystem, will need it later.
          $df_output=exec("df -T $document_root|awk 'END{print \$2,\$NF}'");
          $file_system = explode(" ", $df_output)[0];
          $primitive_root = explode(" ", $df_output)[1];
          $df_output=explode(" ", exec("df -T $document_root|awk 'END{print \$2,\$NF}'"));
          $file_system = $df_output[0];
          $primitive_root = $df_output[1];
          if ( in_array($file_system , array('ext2','ext3','ext4'), true) ) {
            exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null');
server/plugins-available/cron_plugin.inc.php
@@ -136,9 +136,9 @@
            }
            // get the primitive folder for document_root and the filesystem, will need it later.
            $df_output=exec("df -T $document_root|awk 'END{print \$2,\$NF}'");
            $file_system = explode(" ", $df_output)[0];
            $primitive_root = explode(" ", $df_output)[1];
            $df_output=explode(" ", exec("df -T $document_root|awk 'END{print \$2,\$NF}'"));
            $file_system = $df_output[0];
            $primitive_root = $df_output[1];
            if ( in_array($file_system , array('ext2','ext3','ext4'),true) ) {
              exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null');
server/plugins-available/mail_plugin.inc.php
@@ -206,7 +206,9 @@
        }
        //* Send the welcome email message
        $domain = explode('@', $data["new"]["email"])[1];
        $tmp = explode('@', $data["new"]["email"]);
        $domain = $tmp[1];
        unset($tmp);
        $html = false;
        if(file_exists($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html')) {
            $lines = file($conf['rootpath'].'/conf-custom/mail/welcome_email_'.$domain.'.html');
@@ -466,7 +468,9 @@
            if( $server_config['backup_dir_is_mount'] == 'y' && !$app->system->mount_backup_dir($backup_dir) ) $mount_backup = false;
            if($mount_backup){
                $sql = "SELECT * FROM mail_domain WHERE domain = ?";
                $domain_rec = $app->db->queryOneRecord($sql, explode("@",$data['old']['email'])[1]);
                $tmp = explode("@",$data['old']['email']);
                $domain_rec = $app->db->queryOneRecord($sql,$tmp[1]);
                unset($tmp);
                if (is_array($domain_rec)) {
                    $mail_backup_dir = $backup_dir.'/mail'.$domain_rec['domain_id'];
                    $mail_backup_files = 'mail'.$data['old']['mailuser_id'];
server/plugins-available/nginx_plugin.inc.php
@@ -741,9 +741,9 @@
            }
            
          // get the primitive folder for document_root and the filesystem, will need it later.
          $df_output=exec("df -T $document_root|awk 'END{print \$2,\$NF}'");
          $file_system = explode(" ", $df_output)[0];
          $primitive_root = explode(" ", $df_output)[1];
          $df_output=explode(" ", exec("df -T $document_root|awk 'END{print \$2,\$NF}'"));
          $file_system = $df_output[0];
          $primitive_root = $df_output[1];
          if ( in_array($file_system , array('ext2','ext3','ext4'), true) ) {
            exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null');