From e5cbc532c300142e50f9a6ffb14229595dd74c78 Mon Sep 17 00:00:00 2001 From: Michael Gapczynski Date: Wed, 29 Aug 2012 11:54:31 -0400 Subject: Fix password authentication for links and fix template problems for links by creating a new base layout --- lib/templatelayout.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/templatelayout.php') diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 588a7845997..18fd23aac95 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -29,14 +29,16 @@ class OC_TemplateLayout extends OC_Template { break; } } - }else{ - parent::__construct( 'core', 'layout.guest' ); + } else if ($renderas == 'guest') { + parent::__construct('core', 'layout.guest'); + } else { + parent::__construct('core', 'layout.base'); } $apps_paths = array(); foreach(OC_App::getEnabledApps() as $app){ $apps_paths[$app] = OC_App::getAppWebPath($app); - } + } $this->assign( 'apps_paths', str_replace('\\/', '/',json_encode($apps_paths)),false ); // Ugly unescape slashes waiting for better solution // Add the js files @@ -63,7 +65,7 @@ class OC_TemplateLayout extends OC_Template { foreach(OC::$APPSROOTS as $app_root) { if($root == $app_root['path']) { $in_root = true; - break; + break; } } -- cgit v1.2.3