mikuli.cz

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

commit 374c475a15b371cf85cdb1e604b62814c8ddcb9d
parent 347a5d006ba5dd0d5accbd7dc2cd79a75a7bd451
Author: markseu <mark2011@mayberg.se>
Date:   Fri, 24 Aug 2018 12:46:30 +0200

Summer rain remix, more debugging information

Diffstat:
Msystem/plugins/bundle.php | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/system/plugins/bundle.php b/system/plugins/bundle.php @@ -4,7 +4,7 @@ // This file may be used and distributed under the terms of the public license. class YellowBundle { - const VERSION = "0.7.1"; + const VERSION = "0.7.2"; public $yellow; //access to API // Handle initialisation @@ -96,7 +96,7 @@ class YellowBundle { $this->yellow->toolbox->timerStart($time); $id = substru(md5(implode($fileNames).$base), 0, 10); $fileNameBundle = $this->yellow->config->get("assetDir")."bundle-$id.min.$type";; - $locationBundle = $base.$this->yellow->config->get("assetLocation")."bundle-$id.min.$type";; + $locationBundle = $base.$this->yellow->config->get("assetLocation")."bundle-$id.min.$type"; if ($type=="css") { $data[$locationBundle] = "<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"".htmlspecialchars($locationBundle)."\" />\n"; } else { @@ -111,6 +111,10 @@ 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 (!$this->yellow->toolbox->createFile($fileNameBundle, $fileDataNew) || !$this->yellow->toolbox->modifyFile($fileNameBundle, $modified)) { $this->yellow->page->error(500, "Can't write file '$fileNameBundle'!"); @@ -146,7 +150,6 @@ class YellowBundle { // Process bundle, minify data public function processBundleMinify($scheme, $address, $base, $fileData, $fileName, $type) { - $minifier = $type=="css" ? new MinifyCss() : new MinifyJavaScript(); if (preg_match("/\.min/", $fileName)) $minifier = new MinifyBasic(); $minifier->add($fileData);