Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-18 17:40:43 +0400
committerBart Visscher <bartv@thisnet.nl>2012-06-18 17:40:48 +0400
commit2f00384b5124ec0b3f3703d73a11a129aff93a62 (patch)
treec444180780c193eb27e87b648609ad47f23d5a21 /lib/minimizer
parent3000e8f9d508088abe7bb9c2cbc8f3490fa36c9a (diff)
Use TemplateLayout functions for finding js and css files in minimizer
Diffstat (limited to 'lib/minimizer')
-rw-r--r--lib/minimizer/css.php44
-rw-r--r--lib/minimizer/js.php43
2 files changed, 0 insertions, 87 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;
diff --git a/lib/minimizer/js.php b/lib/minimizer/js.php
index b9a023e0686..0f5cb7e5577 100644
--- a/lib/minimizer/js.php
+++ b/lib/minimizer/js.php
@@ -6,49 +6,6 @@ class OC_Minimizer_JS extends OC_Minimizer
{
protected $contentType = 'application/javascript';
- public function findFiles($scripts) {
- // 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();
- // Add the core js files or the js files provided by the selected theme
- foreach($scripts as $script){
- // Is it in 3rd party?
- if($this->appendIfExist(OC::$THIRDPARTYROOT, OC::$THIRDPARTYWEBROOT, $script.'.js')) {
-
- // Is it in apps and overwritten by the theme?
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/apps/$script.js" )) {
-
- // Is it part of an app?
- }elseif($this->appendIfExist(OC::$APPSROOT, OC::$APPSWEBROOT, "apps/$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$APPSROOT, OC::$APPSWEBROOT, "apps/$script.js" )) {
-
- // Is it in the owncloud root but overwritten by the theme?
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/$script.js" )) {
-
- // Is it in the owncloud root ?
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "$script.js" )) {
-
- // Is in core but overwritten by a theme?
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/core/$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "themes/$theme/core/$script.js" )) {
-
- // Is it in core?
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "core/$script$fext.js" )) {
- }elseif($this->appendIfExist(OC::$SERVERROOT, OC::$WEBROOT, "core/$script.js" )) {
-
- }else{
- echo('js file not found: script:'.$script.' formfactor:'.$fext.' webroot:'.OC::$WEBROOT.' serverroot:'.OC::$SERVERROOT);
- die();
- }
- }
- return $this->files;
- }
-
public function minimizeFiles($files) {
$js_out = '';
foreach($files as $file_info) {