Repository: airavata-php-gateway Updated Branches: refs/heads/master aedf097d6 -> 0c0444079
AIRAVATA-2441 Use landingpage for 'home' if user not logged in Project: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/commit/0c044407 Tree: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/tree/0c044407 Diff: http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/diff/0c044407 Branch: refs/heads/master Commit: 0c044407923b752515e249a0099c6566125e340e Parents: aedf097 Author: Marcus Christie <[email protected]> Authored: Wed Aug 9 11:57:07 2017 -0400 Committer: Marcus Christie <[email protected]> Committed: Wed Aug 9 17:28:27 2017 -0400 ---------------------------------------------------------------------- app/controllers/HomeController.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata-php-gateway/blob/0c044407/app/controllers/HomeController.php ---------------------------------------------------------------------- diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index d8627dd..c3c48d9 100755 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -17,7 +17,17 @@ class HomeController extends BaseController { public function getIndex() { - Session::put("nav-active", "home"); + Session::put("nav-active", "home"); + // If not logged in and theme has a landing page, display the landing page + if (!CommonUtilities::id_in_session()){ + try { + $theme = Theme::uses( Session::get("theme") ); + // FIXME: can't figure out how to pass variables to the landingpage template + return View::make($theme->scope('landingpage')->location()); + }catch (Exception $ex){ + Log::debug("Theme has no landingpage view, will render standard home page", array($ex->getMessage())); + } + } return View::make('home'); }
