From: Frank J. Gómez Date: Mon, 10 Aug 2015 03:57:51 +0000 (-0400) Subject: Removed unnecessary flag variable in template. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=e807a9a6d193c0bbbd8e7ef6136944d555381503;p=civicrm-core.git Removed unnecessary flag variable in template. --- 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}