bug fix for writing to root "/"
This commit is contained in:
parent
70d84874e0
commit
176aec266a
@ -222,7 +222,6 @@
|
|||||||
global $config;
|
global $config;
|
||||||
$uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri;
|
$uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri;
|
||||||
|
|
||||||
|
|
||||||
foreach($config['purge'] as &$purge) {
|
foreach($config['purge'] as &$purge) {
|
||||||
$host = $purge[0];
|
$host = $purge[0];
|
||||||
$port = $purge[1];
|
$port = $purge[1];
|
||||||
@ -274,7 +273,13 @@
|
|||||||
// Purge cache
|
// Purge cache
|
||||||
if(basename($path) == $config['file_index']) {
|
if(basename($path) == $config['file_index']) {
|
||||||
// Index file (/index.html); purge "/" as well
|
// Index file (/index.html); purge "/" as well
|
||||||
purge(dirname($path) . '/');
|
$uri = dirname($path);
|
||||||
|
// root
|
||||||
|
if($uri == '.')
|
||||||
|
$uri = '';
|
||||||
|
else
|
||||||
|
$uri .= '/';
|
||||||
|
purge($uri);
|
||||||
}
|
}
|
||||||
purge($path);
|
purge($path);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user