Added more sandbox functionality, including a script to generate the sandbox on the fly from the absolute latest data.
git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@813 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
@@ -196,6 +196,14 @@ class AppController extends Controller {
|
|||||||
$this->addSideMenuLink('Deposits',
|
$this->addSideMenuLink('Deposits',
|
||||||
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
array('controller' => 'transactions', 'action' => 'deposit'), null,
|
||||||
'SITE');
|
'SITE');
|
||||||
|
if (sandbox())
|
||||||
|
$this->addSideMenuLink('Leave Sandbox',
|
||||||
|
preg_replace("%^/([^/]+)\.sand%", "/$1", $_SERVER['REQUEST_URI']), null,
|
||||||
|
'SITE');
|
||||||
|
else
|
||||||
|
$this->addSideMenuLink('Sandbox',
|
||||||
|
preg_replace("%^/([^/]+)%", "/$1.sand", $_SERVER['REQUEST_URI']), null,
|
||||||
|
'SITE');
|
||||||
|
|
||||||
|
|
||||||
$this->addSideMenuLink('Accounts',
|
$this->addSideMenuLink('Accounts',
|
||||||
|
|||||||
5
site/build_sandbox.cmd
Normal file
5
site/build_sandbox.cmd
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
mysqldump --user=pmgr --password=pmgruser --opt property_manager > H:\pmgr_sand.sql
|
||||||
|
mysql --user=pmgr --password=pmgruser --database=pmgr_sand < H:\pmgr_sand.sql
|
||||||
|
del H:\pmgr_sand.sql
|
||||||
|
echo Build Complete!
|
||||||
@@ -39,8 +39,8 @@ class UtilController extends AppController {
|
|||||||
$this->layout = null;
|
$this->layout = null;
|
||||||
$this->autoLayout = false;
|
$this->autoLayout = false;
|
||||||
$this->autoRender = false;
|
$this->autoRender = false;
|
||||||
Configure::write('debug', '2');
|
Configure::write('debug', '0');
|
||||||
$script = preg_replace('%/webroot/index.php%',
|
$script = preg_replace('%/webroot/index.php$%',
|
||||||
'/build_sandbox.cmd',
|
'/build_sandbox.cmd',
|
||||||
$_SERVER['SCRIPT_FILENAME']);
|
$_SERVER['SCRIPT_FILENAME']);
|
||||||
echo "<P>" . date('r') . "\n";
|
echo "<P>" . date('r') . "\n";
|
||||||
|
|||||||
Reference in New Issue
Block a user