summaryrefslogtreecommitdiff
path: root/post.php
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2011-01-02 21:15:59 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2011-01-02 21:15:59 +1100
commitd57977121095a38fcd4c4b98d5ffab63c227a34c (patch)
tree817e24a4a698bc487705efb70d7d6252ec4606b7 /post.php
parent13cd22e32405e7fceb80e12699616829ac0002df (diff)
Mod stickies and redirects
Diffstat (limited to 'post.php')
-rw-r--r--post.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/post.php b/post.php
index f79dc5a6..1cae8714 100644
--- a/post.php
+++ b/post.php
@@ -91,6 +91,9 @@
// Liar. You're not a mod.
error(ERROR_NOTAMOD);
}
+
+ $post['sticky'] = isset($_POST['sticky']);
+ $post['locked'] = isset($_POST['lock']);
}
if($post['has_file']) {
@@ -311,10 +314,13 @@
buildIndex();
sql_close();
+
+ $root = $post['mod'] ? ROOT . FILE_MOD . '?/' : ROOT;
+
if(ALWAYS_NOKO || $noko) {
- header('Location: ' . ROOT . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, REDIRECT_HTTP);
+ header('Location: ' . $root . $board['dir'] . DIR_RES . ($OP?$id:$post['thread']) . '.html' . (!$OP?'#'.$id:''), true, REDIRECT_HTTP);
} else {
- header('Location: ' . ROOT . $board['dir'] . FILE_INDEX, true, REDIRECT_HTTP);
+ header('Location: ' . $root . $board['dir'] . FILE_INDEX, true, REDIRECT_HTTP);
}
exit;