1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-27 17:00:52 +01:00

Fix last commit: purge() issue

This commit is contained in:
Michael Foster 2013-07-31 02:19:58 -04:00
parent 42cba53887
commit b22bcdecf9

View File

@ -366,6 +366,11 @@ function boardTitle($uri) {
function purge($uri) {
global $config, $debug;
// Fix for Unicode
$uri = urlencode($uri);
$uri = str_replace("%2F", "/", $uri);
$uri = str_replace("%3A", ":", $uri);
if (preg_match($config['referer_match'], $config['root']) && isset($_SERVER['REQUEST_URI'])) {
$uri = (str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) == '/' ? '/' : str_replace('\\', '/', dirname($_SERVER['REQUEST_URI'])) . '/') . $uri;
} else {