From 5d9d81f8755e3975a65e43b16a0dffa1a3187114 Mon Sep 17 00:00:00 2001 From: Steve Clay Date: Sun, 25 Jul 2010 05:11:41 +0000 Subject: [PATCH] Issue 167, Issue 186, integrated Solar_Dir::tmp into file cache --- min/builder/_index.js | 2 +- min/builder/index.php | 10 +- min/config.php | 6 + min/lib/HTTP/ConditionalGet.php | 4 +- min/lib/Minify.php | 4 +- min/lib/Minify/Cache/File.php | 64 +++++- min/lib/Minify/Cache/ZendPlatform.php | 142 +++++++++++++ min/lib/Solar/Dir.php | 199 ------------------ min_unit_tests/test_Minify_Cache_File.php | 6 +- .../test_Minify_Cache_ZendPlatform.php | 33 +++ min_unit_tests/test_all.php | 1 + 11 files changed, 258 insertions(+), 213 deletions(-) create mode 100644 min/lib/Minify/Cache/ZendPlatform.php delete mode 100644 min/lib/Solar/Dir.php create mode 100644 min_unit_tests/test_Minify_Cache_ZendPlatform.php diff --git a/min/builder/_index.js b/min/builder/_index.js index cf40a3e..ca2d497 100644 --- a/min/builder/_index.js +++ b/min/builder/_index.js @@ -200,7 +200,7 @@ var MUB = { * Runs on DOMready */ ,init : function () { - $('#jsDidntLoad').hide(); + $('#jsDidntLoad').remove(); $('#app').show(); $('#sources').html(''); $('#add button').click(MUB.addButtonClick); diff --git a/min/builder/index.php b/min/builder/index.php index bd3de96..deb0fea 100644 --- a/min/builder/index.php +++ b/min/builder/index.php @@ -33,7 +33,7 @@ $setIncludeSuccess = set_include_path(dirname(__FILE__) . '/../lib' . PATH_SEPAR // we do it this way because we want the builder to work after the user corrects // include_path. (set_include_path returning FALSE is OK). try { - require_once 'Solar/Dir.php'; + require_once 'Minify/Cache/File.php'; } catch (Exception $e) { if (! $setIncludeSuccess) { echo "Minify: set_include_path() failed. You may need to set your include_path " @@ -46,8 +46,8 @@ try { require 'Minify.php'; $cachePathCode = ''; -if (! isset($min_cachePath)) { - $detectedTmp = rtrim(Solar_Dir::tmp(), DIRECTORY_SEPARATOR); +if (! isset($min_cachePath) && ! function_exists('sys_get_temp_dir')) { + $detectedTmp = Minify_Cache_File::tmp(); $cachePathCode = "\$min_cachePath = " . var_export($detectedTmp, 1) . ';'; } @@ -73,6 +73,7 @@ b {color:#c00} .topNote {background: #ff9; display:inline-block; padding:.5em .6em; margin:0 0 1em;} .topWarning {background:#c00; color:#fff; padding:.5em .6em; margin:0 0 1em;} .topWarning a {color:#fff;} +#jsDidntLoad {display:none;} @@ -179,11 +180,10 @@ by Minify. E.g. @import "/min/?g=css2";<