1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-21 21:26:13 +02:00

+ Solar_Dir for better PHP compat. Moved most of minify.php code to Controller/Version1.php. + a few tests for version1/minify.php

This commit is contained in:
Steve Clay
2008-03-27 16:04:45 +00:00
parent c15acc8782
commit cd0675f490
10 changed files with 353 additions and 103 deletions

View File

@@ -13,9 +13,8 @@
* and by the article "Supercharged JavaScript" by Patrick Hunlock
* <wb@hunlock.com>.
*
* JSMin was originally written by Douglas Crockford <douglas@crockford.com>.
*
* Requires PHP 5.2.1+.
* Requires PHP 5.1.0.
* Tested on PHP 5.1.6.
*
* @package Minify
* @author Ryan Grove <ryan@wonko.com>
@@ -56,9 +55,12 @@ class Minify {
* @return null
*/
public static function useServerCache($path = null) {
self::$_cachePath = (null === $path)
? sys_get_temp_dir()
: $path;
if (null !== $path) {
self::$_cachePath = $path;
} else {
require_once 'Solar/Dir.php';
self::$_cachePath = rtrim(Solar_Dir::tmp(), DIRECTORY_SEPARATOR);
}
}
/**