From e807a9a6d193c0bbbd8e7ef6136944d555381503 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Frank=20J=2E=20G=C3=B3mez?= Date: Sun, 9 Aug 2015 23:57:51 -0400 Subject: [PATCH] Removed unnecessary flag variable in template. --- Civi/Angular/Page/Main.php | 10 ++++------ templates/Civi/Angular/Page/Main.tpl | 8 ++++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Civi/Angular/Page/Main.php b/Civi/Angular/Page/Main.php index c01da3d493..8f60319f56 100644 --- a/Civi/Angular/Page/Main.php +++ b/Civi/Angular/Page/Main.php @@ -109,11 +109,9 @@ class Main extends \CRM_Core_Page { } } - //This will enable setting of the lacation hash so that Angular knows - //Which page it is trying to load. - $this->assign("setRoute", ($this->region == "ajax-snippet")); - if($this->region == "ajax-snippet") { - $this->assign("route", $_REQUEST['route']); - } + // Set the location hash so that Angular knows which page it is trying to load. + $route = \CRM_Utils_Request::retrieve('route', 'String'); + $this->assign("route", $route); } + } diff --git a/templates/Civi/Angular/Page/Main.tpl b/templates/Civi/Angular/Page/Main.tpl index 271124e4fc..c547e66f15 100644 --- a/templates/Civi/Angular/Page/Main.tpl +++ b/templates/Civi/Angular/Page/Main.tpl @@ -1,7 +1,7 @@ -{if $setRoute} - +{if $route} + {/if} {literal}
-- 2.25.1