mikuli.cz

:)
git clone https://git.sr.ht/~ashymad/mikuli.cz
Log | Files | Refs

commit b1e5b153dfb7ed7e8d5780d7943084cd3bacbe10
parent a65ab2d084995ab66472b996c372c3e5d06e00ab
Author: markseu <mark2011@mayberg.se>
Date:   Tue, 26 Mar 2019 10:01:21 +0100

Updated bundle extension

Diffstat:
Msystem/extensions/bundle.php | 10++--------
Msystem/settings/system.ini | 1-
2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/system/extensions/bundle.php b/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; } diff --git a/system/settings/system.ini b/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