Commit 2e8b8edb48a8259a2f89f7edbfc4c29725ac0dc3
1 parent
88776e27
KTS-2572
"Storage Utilisation dashlet only works in linux" Fixed. It now works with cygwin/df in Windows Fixed By: Conrad Vermeulen Reviewed By: Jalaloedien Abrahams git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@8094 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
3 additions
and
7 deletions
plugins/housekeeper/DiskUsageDashlet.inc.php
| @@ -88,7 +88,8 @@ class DiskUsageDashlet extends KTBaseDashlet | @@ -88,7 +88,8 @@ class DiskUsageDashlet extends KTBaseDashlet | ||
| 88 | if (OS_WINDOWS) | 88 | if (OS_WINDOWS) |
| 89 | { | 89 | { |
| 90 | $cmd = str_replace( '/','\\',$cmd); | 90 | $cmd = str_replace( '/','\\',$cmd); |
| 91 | - $result = `"$cmd" 2>&1`; | 91 | + $res = KTUtil::pexec("\"$cmd\" 2>&1"); |
| 92 | + $result = implode("\r\n",$res['out']); | ||
| 92 | } | 93 | } |
| 93 | else | 94 | else |
| 94 | { | 95 | { |
plugins/housekeeper/HouseKeeperPlugin.php
| @@ -146,12 +146,7 @@ class HouseKeeperPlugin extends KTPlugin | @@ -146,12 +146,7 @@ class HouseKeeperPlugin extends KTPlugin | ||
| 146 | 146 | ||
| 147 | function setup() | 147 | function setup() |
| 148 | { | 148 | { |
| 149 | - if (OS_UNIX) | ||
| 150 | - { | ||
| 151 | - // unfortunately, df only seems to be working under linux at this stage. we had | ||
| 152 | - // issues getting gnuwin32's df to run in the stack. the application kept on core dumping! ;( | ||
| 153 | - $this->registerDashlet('DiskUsageDashlet', 'ktcore.diskusage.dashlet', 'DiskUsageDashlet.inc.php'); | ||
| 154 | - } | 149 | + $this->registerDashlet('DiskUsageDashlet', 'ktcore.diskusage.dashlet', 'DiskUsageDashlet.inc.php'); |
| 155 | $this->registerDashlet('FolderUsageDashlet', 'ktcore.folderusage.dashlet', 'FolderUsageDashlet.inc.php'); | 150 | $this->registerDashlet('FolderUsageDashlet', 'ktcore.folderusage.dashlet', 'FolderUsageDashlet.inc.php'); |
| 156 | 151 | ||
| 157 | $oTemplating =& KTTemplating::getSingleton(); | 152 | $oTemplating =& KTTemplating::getSingleton(); |