1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-30 18:24:29 +01:00

Redirect to referer

This commit is contained in:
Savetheinternet 2010-12-16 19:13:04 +11:00
parent 466d5e4832
commit 130efdf467

View File

@ -194,8 +194,13 @@
deletePost($post); deletePost($post);
// Rebuild board // Rebuild board
buildIndex(); buildIndex();
// Redirect to board
header('Location: ?/' . sprintf(BOARD_PATH, $boardName) . FILE_INDEX, true, REDIRECT_HTTP); // Redirect
if(isset($_SERVER['HTTP_REFERER']))
header('Location: ' . $_SERVER['HTTP_REFERER'], true, REDIRECT_HTTP);
else
header('Location: ?/' . sprintf(BOARD_PATH, $boardName) . FILE_INDEX, true, REDIRECT_HTTP);
} else { } else {
error("Page not found."); error("Page not found.");
} }