diff options
Diffstat (limited to 'lib/template.php')
-rw-r--r-- | lib/template.php | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/template.php b/lib/template.php index 6b9a1c38e11..69065e1ea16 100644 --- a/lib/template.php +++ b/lib/template.php @@ -95,8 +95,8 @@ class OC_TEMPLATE{ global $SERVERROOT; // Get the right template folder - $template = "$SERVERROOT/templates/"; - if( $app != "core" && $app != "" ){ + $template = "$SERVERROOT/core/templates/"; + if( $app != "" ){ // Check if the app is in the app folder if( file_exists( "$SERVERROOT/apps/$app/templates/" )){ $template = "$SERVERROOT/apps/$app/templates/"; @@ -222,16 +222,24 @@ class OC_TEMPLATE{ foreach(OC_UTIL::$scripts as $script){ if(is_file("$SERVERROOT/apps/$script.js" )){ $page->append( "jsfiles", "$WEBROOT/apps/$script.js" ); - }else{ + } + elseif(is_file("$SERVERROOT/$script.js" )){ $page->append( "jsfiles", "$WEBROOT/$script.js" ); } + else{ + $page->append( "jsfiles", "$WEBROOT/core/$script.js" ); + } } foreach(OC_UTIL::$styles as $style){ if(is_file("$SERVERROOT/apps/$style.css" )){ $page->append( "cssfiles", "$WEBROOT/apps/$style.css" ); - }else{ + } + elseif(is_file("$SERVERROOT/$style.css" )){ $page->append( "cssfiles", "$WEBROOT/$style.css" ); } + else{ + $page->append( "cssfiles", "$WEBROOT/core/$style.css" ); + } } // Add css files and js files |