From 2e8b8edb48a8259a2f89f7edbfc4c29725ac0dc3 Mon Sep 17 00:00:00 2001 From: Conrad Vermeulen Date: Tue, 19 Feb 2008 12:42:04 +0000 Subject: [PATCH] KTS-2572 "Storage Utilisation dashlet only works in linux" Fixed. It now works with cygwin/df in Windows --- plugins/housekeeper/DiskUsageDashlet.inc.php | 3 ++- plugins/housekeeper/HouseKeeperPlugin.php | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/housekeeper/DiskUsageDashlet.inc.php b/plugins/housekeeper/DiskUsageDashlet.inc.php index 3ae4f6c..6770477 100755 --- a/plugins/housekeeper/DiskUsageDashlet.inc.php +++ b/plugins/housekeeper/DiskUsageDashlet.inc.php @@ -88,7 +88,8 @@ class DiskUsageDashlet extends KTBaseDashlet if (OS_WINDOWS) { $cmd = str_replace( '/','\\',$cmd); - $result = `"$cmd" 2>&1`; + $res = KTUtil::pexec("\"$cmd\" 2>&1"); + $result = implode("\r\n",$res['out']); } else { diff --git a/plugins/housekeeper/HouseKeeperPlugin.php b/plugins/housekeeper/HouseKeeperPlugin.php index 0855f76..3eb639c 100755 --- a/plugins/housekeeper/HouseKeeperPlugin.php +++ b/plugins/housekeeper/HouseKeeperPlugin.php @@ -146,12 +146,7 @@ class HouseKeeperPlugin extends KTPlugin function setup() { - if (OS_UNIX) - { - // unfortunately, df only seems to be working under linux at this stage. we had - // issues getting gnuwin32's df to run in the stack. the application kept on core dumping! ;( - $this->registerDashlet('DiskUsageDashlet', 'ktcore.diskusage.dashlet', 'DiskUsageDashlet.inc.php'); - } + $this->registerDashlet('DiskUsageDashlet', 'ktcore.diskusage.dashlet', 'DiskUsageDashlet.inc.php'); $this->registerDashlet('FolderUsageDashlet', 'ktcore.folderusage.dashlet', 'FolderUsageDashlet.inc.php'); $oTemplating =& KTTemplating::getSingleton(); -- libgit2 0.21.4