summaryrefslogtreecommitdiff
path: root/mod.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-12-16 19:13:04 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-12-16 19:13:04 +1100
commit130efdf467ed59670f108924199a42a33a26b5d2 (patch)
tree2de0a43c5f83b3387f95482ab928600bebbc717b /mod.php
parent466d5e4832d68f6e3a88957db1b0997d12550711 (diff)
Redirect to referer
Diffstat (limited to 'mod.php')
-rw-r--r--mod.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/mod.php b/mod.php
index b44f502f..ddd58ab4 100644
--- a/mod.php
+++ b/mod.php
@@ -194,8 +194,13 @@
deletePost($post);
// Rebuild board
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 {
error("Page not found.");
}