Added link to quickly reset the site data. This will help external testers as they won't have to worry about screwing up the data. Obviously, this is for debug purposes only and will need to be removed before going live.

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629/site@197 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-07-02 01:40:32 +00:00
parent ea1ad4764f
commit 5fa166e881

View File

@@ -48,6 +48,7 @@ class AppController extends Controller {
array('name' => 'Contacts', 'url' => array('controller' => 'contacts', 'action' => 'index')),
array('name' => 'Accounts', 'url' => array('controller' => 'accounts', 'action' => 'index')),
array('name' => 'Ledgers', 'url' => array('controller' => 'ledgers', 'action' => 'index')),
array('name' => 'RESET DATA', 'url' => array('controller' => 'accounts', 'action' => 'reset_data')),
);
}
@@ -55,6 +56,21 @@ class AppController extends Controller {
$this->set('sidemenu', $this->sideMenuLinks());
}
function reset_data() {
$this->layout = null;
$this->autoLayout = false;
$this->autoRender = false;
Configure::write('debug', '0');
$handle = popen('/website/localhost/public_html/pmgr/build.cmd 2>&1', 'r');
echo "'$handle'; " . gettype($handle) . "\n";
echo "<P><PRE>\n";
while (($read = fread($handle, 2096))) {
echo $read;
}
echo "</PRE>\n";
pclose($handle);
}
/**************************************************************************
**************************************************************************