diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-22 01:31:29 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-05-22 01:31:29 +1000 |
| commit | 176aec266a7effcec7682ac94d754a2b84465c6c (patch) | |
| tree | d3de26836b18a081bc9d1fea175e702febcd50d0 | |
| parent | 70d84874e0ccf6e5726f45153011a2bc0389084e (diff) | |
bug fix for writing to root "/"
| -rw-r--r-- | inc/functions.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php index de483340..cba4cc7f 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -222,7 +222,6 @@ global $config; $uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri; - foreach($config['purge'] as &$purge) { $host = $purge[0]; $port = $purge[1]; @@ -274,7 +273,13 @@ // Purge cache if(basename($path) == $config['file_index']) { // Index file (/index.html); purge "/" as well - purge(dirname($path) . '/'); + $uri = dirname($path); + // root + if($uri == '.') + $uri = ''; + else + $uri .= '/'; + purge($uri); } purge($path); } |
