summaryrefslogtreecommitdiffstats
path: root/lib/templatelayout.php
diff options
context:
space:
mode:
authorTom Needham <tom@owncloud.com>2012-12-16 22:29:00 +0000
committerTom Needham <tom@owncloud.com>2012-12-16 22:29:00 +0000
commit3c98f36121c10f703904d63cd531b7bbf6ee9454 (patch)
treec12c9f737e036cec5f1b235214902473b6b418d5 /lib/templatelayout.php
parent39b51997756ebb233be10ca5a8ced0d6c60d0dac (diff)
parent811b571cb3da8494797ed70c5b967067cc2a1b5b (diff)
downloadnextcloud-server-3c98f36121c10f703904d63cd531b7bbf6ee9454.tar.gz
nextcloud-server-3c98f36121c10f703904d63cd531b7bbf6ee9454.zip
Merge branch 'master' into ocs_api
Diffstat (limited to 'lib/templatelayout.php')
-rw-r--r--lib/templatelayout.php30
1 files changed, 21 insertions, 9 deletions
diff --git a/lib/templatelayout.php b/lib/templatelayout.php
index 1a0570a270d..4173e008ba7 100644
--- a/lib/templatelayout.php
+++ b/lib/templatelayout.php
@@ -97,13 +97,13 @@ class OC_TemplateLayout extends OC_Template {
* @param $web base for path
* @param $file the filename
*/
- static public function appendIfExist(&$files, $root, $webroot, $file) {
- if (is_file($root.'/'.$file)) {
+ static public function appendIfExist(&$files, $root, $webroot, $file) {
+ if (is_file($root.'/'.$file)) {
$files[] = array($root, $webroot, $file);
return true;
- }
- return false;
- }
+ }
+ return false;
+ }
static public function findStylesheetFiles($styles) {
// Read the selected theme from the config file
@@ -130,8 +130,14 @@ class OC_TemplateLayout extends OC_Template {
// or in apps?
foreach( OC::$APPSROOTS as $apps_dir)
{
- if(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$style$fext.css")) { $append =true; break; }
- elseif(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$style.css")) { $append =true; break; }
+ if(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$style$fext.css")) {
+ $append = true;
+ break;
+ }
+ elseif(self::appendIfExist($files, $apps_dir['path'], $apps_dir['url'], "$style.css")) {
+ $append = true;
+ break;
+ }
}
if(! $append) {
echo('css file not found: style:'.$style.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
@@ -192,8 +198,14 @@ class OC_TemplateLayout extends OC_Template {
// Is it part of an app?
$append = false;
foreach( OC::$APPSROOTS as $apps_dir) {
- if(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script$fext.js")) { $append =true; break; }
- elseif(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script.js")) { $append =true; break; }
+ if(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script$fext.js")) {
+ $append = true;
+ break;
+ }
+ elseif(self::appendIfExist($files, $apps_dir['path'], OC::$WEBROOT.$apps_dir['url'], "$script.js")) {
+ $append = true;
+ break;
+ }
}
if(! $append) {
echo('js file not found: script:'.$script.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);