From 6a250d0d20c92513a883a7103885712127b51cc8 Mon Sep 17 00:00:00 2001 From: Brice Maron Date: Mon, 4 Jun 2012 19:52:44 +0000 Subject: [PATCH] Correct css file inclusion --- lib/template.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/template.php b/lib/template.php index e6525ec633..fdd608fdc7 100644 --- a/lib/template.php +++ b/lib/template.php @@ -329,10 +329,16 @@ class OC_Template{ if (is_file($root.'/'.$file)) { $pathes = explode('/', $file); - if($type == 'cssfiles' && $root == OC::$APPSROOTS[0] && $in_app){ + $in_root = false; + foreach(OC::$APPSROOTS as $app_root) { + if($root == $app_root['path']) { + $in_root = true; + break; + } + } + if($type == 'cssfiles' && $in_root && $in_app){ $app = $pathes[0]; unset($pathes[0]); -// unset($pathes[1]); $path = implode('/', $pathes); $this->append( $type, OC_Helper::linkTo($app, $path)); }else{