From 640727c5544997a169b1d78edf6404ea76ac16d5 Mon Sep 17 00:00:00 2001 From: Josh Sherman Date: Sun, 13 Jan 2013 00:11:44 -0500 Subject: [PATCH] Turned off modified time checks for CSS files There's a note in the code as to why --- classes/Dynamic.php | 15 ++++++++++++--- jar.php | 19 ++++++++++++------- 2 files changed, 24 insertions(+), 10 deletions(-) diff --git a/classes/Dynamic.php b/classes/Dynamic.php index 149b161..118ae6a 100644 --- a/classes/Dynamic.php +++ b/classes/Dynamic.php @@ -141,9 +141,18 @@ class Dynamic extends Object { $reference = $original_reference; - if (is_writable($path) - && (!file_exists($minified_filename) || filemtime($original_filename) > filemtime($minified_filename)) - && $this->config->pickles['minify'] === true) + /** + * Disabled the sanity checks because I'm using LESS's @import for + * some hackery and it's not validating as true due to the imported + * file not being interrogated. Should be okay as minifying is now + * a subjective action that's turned on in the config due to the + * issues I had in production with it. + * + * if (is_writable($path) + * && (!file_exists($minified_filename) || filemtime($original_filename) > filemtime($minified_filename)) + * && $this->config->pickles['minify'] === true) + */ + if ($this->config->pickles['minify'] === true) { // Compiles LESS to CSS before minifying if ($less) diff --git a/jar.php b/jar.php index 5603152..7b03431 100755 --- a/jar.php +++ b/jar.php @@ -3149,9 +3149,18 @@ class Dynamic extends Object { $reference = $original_reference; - if (is_writable($path) - && (!file_exists($minified_filename) || filemtime($original_filename) > filemtime($minified_filename)) - && $this->config->pickles['minify'] === true) + /** + * Disabled the sanity checks because I'm using LESS's @import for + * some hackery and it's not validating as true due to the imported + * file not being interrogated. Should be okay as minifying is now + * a subjective action that's turned on in the config due to the + * issues I had in production with it. + * + * if (is_writable($path) + * && (!file_exists($minified_filename) || filemtime($original_filename) > filemtime($minified_filename)) + * && $this->config->pickles['minify'] === true) + */ + if ($this->config->pickles['minify'] === true) { // Compiles LESS to CSS before minifying if ($less) @@ -3240,10 +3249,6 @@ class Dynamic extends Object && extension_loaded('curl') && $this->config->pickles['minify'] === true) { - echo '-------- '; - echo('java -jar ' . PICKLES_PATH . 'vendors/google/closure-compiler/compiler.jar --js=' . $original_filename . ' --compilation_level=' . ($level . '_' . ($level == 'WHITESPACE' ? 'ONLY' : 'OPTIMIZATIONS')) . ' --js_output_file=' . $minified_filename); - echo ' -------- '; - exec('java -jar ' . PICKLES_PATH . 'vendors/google/closure-compiler/compiler.jar --js=' . $original_filename . ' --compilation_level=' . ($level . '_' . ($level == 'WHITESPACE' ? 'ONLY' : 'OPTIMIZATIONS')) . ' --js_output_file=' . $minified_filename); $reference = $minified_reference;