diff --git a/interface/web/sites/database_quota_stats.php b/interface/web/sites/database_quota_stats.php index faf362190f8f3d1169989966eae04518aad97f24..5e95fdcaf8cfbeec4e667d995f969e2ebb2be02a 100644 --- a/interface/web/sites/database_quota_stats.php +++ b/interface/web/sites/database_quota_stats.php @@ -57,7 +57,9 @@ class list_action extends listform_actions { 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']; diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php index 8c1da7881412de7fd1c422ea37d51dc81ba75684..4f6d2f0c7f259869895cc63f3e28d09464eeb2da 100644 --- a/server/plugins-available/apache2_plugin.inc.php +++ b/server/plugins-available/apache2_plugin.inc.php @@ -882,9 +882,9 @@ class apache2_plugin { } // 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'); diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index fe3ddfb0b9527bed0f175e22d0e7b9d7e917e8c6..b54e9711be5667bcf4efe975c9dcb708373a4b1b 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -136,9 +136,9 @@ class cron_plugin { } // 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'); diff --git a/server/plugins-available/mail_plugin.inc.php b/server/plugins-available/mail_plugin.inc.php index 8696205a00c64bfd91224434ef56c14d221590be..8275696620fbe1612aa78c816f9a9deaf1f11c7d 100644 --- a/server/plugins-available/mail_plugin.inc.php +++ b/server/plugins-available/mail_plugin.inc.php @@ -206,7 +206,9 @@ class mail_plugin { } //* 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 @@ class mail_plugin { 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']; diff --git a/server/plugins-available/nginx_plugin.inc.php b/server/plugins-available/nginx_plugin.inc.php index 9393a9b66b4b795688a605e73461ac3b5f4f58e5..ff9af43db2c0adb08969cfa95cd47be820304ec4 100644 --- a/server/plugins-available/nginx_plugin.inc.php +++ b/server/plugins-available/nginx_plugin.inc.php @@ -741,9 +741,9 @@ class nginx_plugin { } // 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');