diff --git a/site/app_controller.php b/site/app_controller.php index f4cbf70..f5428ab 100644 --- a/site/app_controller.php +++ b/site/app_controller.php @@ -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'); diff --git a/site/views/layouts/default.ctp b/site/views/layouts/default.ctp index e89827b..c123318 100644 --- a/site/views/layouts/default.ctp +++ b/site/views/layouts/default.ctp @@ -34,7 +34,9 @@ charset(); ?> + <?php if (sandbox()) echo "*SANDBOX* "; ?> Property Manager: <?php echo $title_for_layout; ?> + <?php if (sandbox()) echo " *SANDBOX*"; ?>