Fixed the sandbox/unsandbox URLs. I'd like to make this a route... I'll look into it.

git-svn-id: file:///svn-source/pmgr/branches/pre_0.1_work_20090819@814 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-08-28 21:22:50 +00:00
parent 63e22ec9bf
commit aee6832374
2 changed files with 9 additions and 2 deletions

View File

@@ -196,13 +196,18 @@ class AppController extends Controller {
$this->addSideMenuLink('Deposits',
array('controller' => 'transactions', 'action' => 'deposit'), null,
'SITE');
if (sandbox())
$this->addSideMenuLink('Leave Sandbox',
preg_replace("%^/([^/]+)\.sand%", "/$1", $_SERVER['REQUEST_URI']), null,
('http://' . $_SERVER['SERVER_NAME'] .
preg_replace("%^/([^/]+)\.sand%", "/$1", $_SERVER['REQUEST_URI'])),
null,
'SITE');
else
$this->addSideMenuLink('Sandbox',
preg_replace("%^/([^/]+)%", "/$1.sand", $_SERVER['REQUEST_URI']), null,
('http://' . $_SERVER['SERVER_NAME'] .
preg_replace("%^/([^/]+)%", "/$1.sand", $_SERVER['REQUEST_URI'])),
null,
'SITE');

View File

@@ -34,7 +34,9 @@
<head>
<?php echo $html->charset(); ?>
<title>
<?php if (sandbox()) echo "*SANDBOX* "; ?>
Property Manager: <?php echo $title_for_layout; ?>
<?php if (sandbox()) echo " *SANDBOX*"; ?>
</title>
<?php
// Reset the __scripts variable, which has already been dumped to