From e1ceb050e19c7574bca146a8da7047ee4ff456b5 Mon Sep 17 00:00:00 2001 From: Marius Burkard <m.burkard@pixcept.de> Date: Sun, 10 Jul 2016 05:02:35 -0400 Subject: [PATCH] Merge branch 'stable-3.1' --- server/plugins-available/cron_plugin.inc.php | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/plugins-available/cron_plugin.inc.php b/server/plugins-available/cron_plugin.inc.php index f638166..c7109a5 100644 --- a/server/plugins-available/cron_plugin.inc.php +++ b/server/plugins-available/cron_plugin.inc.php @@ -136,11 +136,11 @@ } // 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 " . escapeshellarg($parent_domain["document_root"]) . "|awk 'END{print \$2,\$NF}'")); + $file_system = $df_output[0]; + $primitive_root = $df_output[1]; - if ( $file_system , array('ext2','ext3','ext4') ) { + if ( in_array($file_system , array('ext2','ext3','ext4'),true) ) { exec('setquota -u '. $username . ' ' . $blocks_soft . ' ' . $blocks_hard . ' 0 0 -a &> /dev/null'); exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null'); } elseif ($file_system == 'xfs') { -- Gitblit v1.9.1