Quellcode durchsuchen

Updated bundle extension

markseu vor 6 Jahren
Ursprung
Commit
b1e5b153df
2 geänderte Dateien mit 2 neuen und 9 gelöschten Zeilen
  1. 2 8
      system/extensions/bundle.php
  2. 0 1
      system/settings/system.ini

+ 2 - 8
system/extensions/bundle.php

@@ -4,14 +4,13 @@
 // This file may be used and distributed under the terms of the public license.
 
 class YellowBundle {
-    const VERSION = "0.8.3";
+    const VERSION = "0.8.4";
     const TYPE = "feature";
     public $yellow;         //access to API
 
     // Handle initialisation
     public function onLoad($yellow) {
         $this->yellow = $yellow;
-        $this->yellow->system->setDefault("bundleAndMinify", "1");
     }
     
     // Handle page output data
@@ -69,7 +68,7 @@ class YellowBundle {
                 array_push($dataOther, $line);
             }
         }
-        if ($this->yellow->system->get("bundleAndMinify")) {
+        if (!defined("DEBUG") || DEBUG==0) {
             $dataCss = $this->processBundle($dataCss, "css");
             $dataScript = $this->processBundle($dataScript, "js");
         }
@@ -113,17 +112,12 @@ class YellowBundle {
                     $fileDataNew .= "/* ".basename($fileName)." */\n";
                     $fileDataNew .= $fileData;
                 }
-                if (defined("DEBUG") && DEBUG>=2) {
-                    if (!empty($fileDataNew)) $fileDataNew .= "\n\n";
-                    $fileDataNew .= "/* YellowBundle::processBundle file:$fileNameBundle <- ".$this->yellow->page->fileName." */";
-                }
                 if (is_file($fileNameBundle)) $this->yellow->toolbox->deleteFile($fileNameBundle);
                 if (!$this->yellow->toolbox->createFile($fileNameBundle, $fileDataNew) ||
                     !$this->yellow->toolbox->modifyFile($fileNameBundle, $modified)) {
                     $this->yellow->page->error(500, "Can't write file '$fileNameBundle'!");
                 }
             }
-            if (defined("DEBUG") && DEBUG>=2) $data["debug"] = "YellowBundle::processBundle file:$fileNameBundle<br/>\n";
         }
         return $data;
     }

+ 0 - 1
system/settings/system.ini

@@ -51,7 +51,6 @@ UpdateVersionFile: version.ini
 UpdateWaffleFile: waffle.ini
 UpdateNotification: none
 
-BundleAndMinify: 1
 EditLocation: /edit/
 EditUploadNewLocation: /media/@group/@filename
 EditUploadExtensions: .gif, .jpg, .pdf, .png, .svg, .tgz, .zip