diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-06-18 15:40:43 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-06-18 15:40:48 +0200 |
commit | 2f00384b5124ec0b3f3703d73a11a129aff93a62 (patch) | |
tree | c444180780c193eb27e87b648609ad47f23d5a21 /lib/minimizer/css.php | |
parent | 3000e8f9d508088abe7bb9c2cbc8f3490fa36c9a (diff) | |
download | nextcloud-server-2f00384b5124ec0b3f3703d73a11a129aff93a62.tar.gz nextcloud-server-2f00384b5124ec0b3f3703d73a11a129aff93a62.zip |
Use TemplateLayout functions for finding js and css files in minimizer
Diffstat (limited to 'lib/minimizer/css.php')
-rw-r--r-- | lib/minimizer/css.php | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/lib/minimizer/css.php b/lib/minimizer/css.php index 09a0efdc3a7..da502bfa9e8 100644 --- a/lib/minimizer/css.php +++ b/lib/minimizer/css.php @@ -6,50 +6,6 @@ class OC_Minimizer_CSS extends OC_Minimizer { protected $contentType = 'text/css'; - public function findFiles($styles) { - // Read the selected theme from the config file - $theme=OC_Config::getValue( "theme" ); - - // Read the detected formfactor and use the right file name. - $fext = OC_Template::getFormFactorExtension(); - foreach($styles as $style){ - // is it in 3rdparty? - if($this->appendIfExist(OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $style.'.css')) { - - // or in apps? - }elseif($this->appendIfExist(OC::$APPSROOT, OC::$APPSWEBROOT, "apps/$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$APPSROOT, OC::$APPSWEBROOT, "apps/$style.css" )) { - - // or in the owncloud root? - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "$style.css" )) { - - // or in core ? - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "core/$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "core/$style.css" )) { - - }else{ - echo('css file not found: style:'.$style.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT); - die(); - } - } - // Add the theme css files. you can override the default values here - if(!empty($theme)) { - foreach($styles as $style){ - if($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$style.css" )) { - - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/$style.css" )) { - - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/core/$style$fext.css" )) { - }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/core/$style.css" )) { - } - } - } - return $this->files; - } - public function minimizeFiles($files) { $css_out = ''; $appswebroot = (string) OC::$APPSWEBROOT; |