Modified the rebuild_sandbox action to redirect instead of dumping debug output.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@815 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-28 21:38:23 +00:00
parent aee6832374
commit 328d0f8f51

View File

@@ -43,18 +43,20 @@ class UtilController extends AppController {
$script = preg_replace('%/webroot/index.php$%',
'/build_sandbox.cmd',
$_SERVER['SCRIPT_FILENAME']);
echo "<P>" . date('r') . "\n";
echo "<P>Script: $script" . "\n";
// REVISIT <AP>: 20090828
// Just use system call
$handle = popen($script . ' 2>&1', 'r');
//echo "<P>Handle: $handle; " . gettype($handle) . "\n";
echo "<P><PRE>\n";
while (($read = fread($handle, 2096))) {
echo $read;
// Do nothing
}
echo "</PRE>\n";
pclose($handle);
$url = $_SERVER['HTTP_REFERER'];
if (empty($url))
$url = "/";
$this->redirect($url);
}
}