1
0
mirror of https://github.com/mrclay/minify.git synced 2025-08-24 14:42:50 +02:00

wrap paths with realpath() to fix problems with NFS mounted web roots

This commit is contained in:
Ryan Grove
2007-05-05 17:24:51 +00:00
parent 69b94bfa8f
commit 2e8553a91f

View File

@@ -25,7 +25,7 @@ if (!defined('MINIFY_BASE_DIR')) {
* Base path from which all relative file paths should be resolved. By default
* this is set to the document root.
*/
define('MINIFY_BASE_DIR', $_SERVER['DOCUMENT_ROOT']);
define('MINIFY_BASE_DIR', realpath($_SERVER['DOCUMENT_ROOT']));
}
if (!defined('MINIFY_CACHE_DIR')) {
@@ -459,7 +459,7 @@ class MinifyInvalidArgumentException extends MinifyException {}
class MinifyInvalidUrlException extends MinifyException {}
// -- Global Scope -------------------------------------------------------------
if (__FILE__ == $_SERVER['SCRIPT_FILENAME']) {
if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) {
Minify::handleRequest();
}
?>