layout = null; $this->autoLayout = false; $this->autoRender = false; Configure::write('debug', '0'); $script = $_SERVER['DOCUMENT_ROOT'] . '/pmgr/build.cmd'; echo "

" . date('r') . "\n"; //echo "

Script: $script" . "\n"; $handle = popen($script . ' 2>&1', 'r'); //echo "

Handle: $handle; " . gettype($handle) . "\n"; echo "

\n";
    while (($read = fread($handle, 2096))) {
      echo $read;
    }
    echo "
\n"; pclose($handle); } /************************************************************************** ************************************************************************** ************************************************************************** * function: rebuild_box */ function rebuild_box($type) { $this->layout = null; $this->autoLayout = false; $this->autoRender = false; Configure::write('debug', '0'); $script = preg_replace('%/webroot/index.php$%', '/build_'.$type.'box.cmd', $_SERVER['SCRIPT_FILENAME']); // REVISIT : 20090828 // Just use system call $handle = popen($script . ' 2>&1', 'r'); while (($read = fread($handle, 2096))) { // Do nothing } pclose($handle); $url = $_SERVER['HTTP_REFERER']; if (empty($url)) $url = "/"; $this->redirect($url); } function rebuild_sandbox() { $this->rebuild_box('sand'); } function rebuild_devbox() { $this->rebuild_box('dev'); } /************************************************************************** ************************************************************************** ************************************************************************** * function: logmsg * - action to allow posting log message data */ function logmsg() { } }