From b543fc86329de0f07d8aa753bde526ab9020e439 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Tue, 21 Apr 2009 20:53:29 +0000 Subject: [PATCH] Minify.php : + version Controller/Page.php : requires to require_once --- min/lib/Minify.php | 15 ++++++++++----- min/lib/Minify/Controller/Page.php | 4 ++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/min/lib/Minify.php b/min/lib/Minify.php index 52317e1..364ee81 100644 --- a/min/lib/Minify.php +++ b/min/lib/Minify.php @@ -28,7 +28,8 @@ require_once 'Minify/Source.php'; * @link http://code.google.com/p/minify/ */ class Minify { - + + const VERSION = '2.2.0'; const TYPE_CSS = 'text/css'; const TYPE_HTML = 'text/html'; // there is some debate over the ideal JS Content-Type, but this is the @@ -156,7 +157,8 @@ class Minify { * with keys "success" (bool), "statusCode" (int), "content" (string), and * "headers" (array). */ - public static function serve($controller, $options = array()) { + public static function serve($controller, $options = array()) + { if (is_string($controller)) { // make $controller into object $class = 'Minify_Controller_' . $controller; @@ -423,7 +425,8 @@ class Minify { * * @return string */ - protected static function _combineMinify() { + protected static function _combineMinify() + { $type = self::$_options['contentType']; // ease readability // when combining scripts, make sure all statements separated and @@ -496,7 +499,8 @@ class Minify { * * @return string */ - protected static function _getCacheId() { + protected static function _getCacheId() + { return md5(serialize(array( Minify_Source::getDigest(self::$_controller->sources) ,self::$_options['minifiers'] @@ -510,7 +514,8 @@ class Minify { * Bubble CSS @imports to the top or prepend a warning if an * @import is detected not at the top. */ - protected static function _handleCssImports($css) { + protected static function _handleCssImports($css) + { if (self::$_options['bubbleCssImports']) { // bubble CSS imports preg_match_all('/@import.*?;/', $css, $imports); diff --git a/min/lib/Minify/Controller/Page.php b/min/lib/Minify/Controller/Page.php index 2773bbb..8a384e0 100644 --- a/min/lib/Minify/Controller/Page.php +++ b/min/lib/Minify/Controller/Page.php @@ -76,8 +76,8 @@ class Minify_Controller_Page extends Minify_Controller_Base { if ($this->_loadCssJsMinifiers) { // Minify will not call for these so we must manually load // them when Minify/HTML.php is called for. - require 'Minify/CSS.php'; - require 'JSMin.php'; + require_once 'Minify/CSS.php'; + require_once 'JSMin.php'; } parent::loadMinifier($minifierCallback); // load Minify/HTML.php }