]> source.dussan.org Git - nextcloud-server.git/commitdiff
Test if we want a 3rdparty style/script before checking the 3rdparty root
authorBart Visscher <bartv@thisnet.nl>
Fri, 19 Apr 2013 14:04:33 +0000 (16:04 +0200)
committerBart Visscher <bartv@thisnet.nl>
Fri, 19 Apr 2013 14:09:39 +0000 (16:09 +0200)
lib/templatelayout.php

index 730942322306d8fa200d86b6b11d6272ceaefba2..69bebac050397c66d0e7c33ddcb7d1aaae56bf9d 100644 (file)
@@ -111,7 +111,8 @@ class OC_TemplateLayout extends OC_Template {
                $files = array();
                foreach($styles as $style) {
                        // is it in 3rdparty?
-                       if(self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) {
+                       if(strpos($style, '3rdparty') === 0 &&
+                               self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) {
 
                        // or in the owncloud root?
                        }elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, "$style$fext.css" )) {
@@ -169,7 +170,8 @@ class OC_TemplateLayout extends OC_Template {
                $files = array();
                foreach($scripts as $script) {
                        // Is it in 3rd party?
-                       if(self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script.'.js')) {
+                       if(strpos($script, '3rdparty') === 0 &&
+                               self::appendIfExist($files, OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script.'.js')) {
 
                        // Is it in apps and overwritten by the theme?
                        }elseif(self::appendIfExist($files, OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$script$fext.js" )) {