Update user_dashboard.php (#2392)

Calling which via php-fpm on centos returns null.
CentOS has df in path for nginx/php-fpm scrtips.
This commit is contained in:
Adam Niedzwiedzki 2017-03-08 18:43:04 +11:00 committed by FusionPBX
parent e528163f5e
commit 295283ca1c
1 changed files with 5 additions and 1 deletions

View File

@ -939,7 +939,11 @@
//disk usage
if (stristr(PHP_OS, 'Linux')) {
$df = shell_exec("/usr/bin/which df");
$tmp = shell_exec($df." /home 2>&1");
if($df){
$tmp = shell_exec($df." /home 2>&1");
} else {
$tmp = shell_exec("df /home 2>&1");
}
$tmp = explode("\n", $tmp);
$tmp = preg_replace('!\s+!', ' ', $tmp[1]); // multiple > single space
$tmp = explode(' ', $tmp);