summaryrefslogtreecommitdiff
path: root/inc/mod
diff options
context:
space:
mode:
authorczaks <marcin@6irc.net>2013-08-09 17:42:19 -0400
committerczaks <marcin@6irc.net>2013-08-09 17:42:19 -0400
commit6fb2ea3b31015e5ea0bddfd3baf35c94fae60218 (patch)
treeb2b4bf2dd3b2cadda5c3ecf4670c4a13df85ca4d /inc/mod
parentef4cf16a7321d6ba6b36830c9d442e1cb4c74ac2 (diff)
fix support for board prefixes after merge
Diffstat (limited to 'inc/mod')
-rw-r--r--inc/mod/pages.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/inc/mod/pages.php b/inc/mod/pages.php
index fb759357..9c26e0c4 100644
--- a/inc/mod/pages.php
+++ b/inc/mod/pages.php
@@ -1011,7 +1011,7 @@ function mod_move_reply($originBoard, $postID) {
if (!hasPermission($config['mod']['move'], $originBoard))
error($config['error']['noaccess']);
- $query = prepare(sprintf('SELECT * FROM `posts_%s` WHERE `id` = :id', $originBoard));
+ $query = prepare(sprintf('SELECT * FROM ``posts_%s`` WHERE `id` = :id', $originBoard));
$query->bindValue(':id', $postID);
$query->execute() or error(db_error($query));
if (!$post = $query->fetch(PDO::FETCH_ASSOC))
@@ -1021,7 +1021,7 @@ function mod_move_reply($originBoard, $postID) {
$targetBoard = $_POST['board'];
if ($_POST['target_thread']) {
- $query = prepare(sprintf('SELECT * FROM `posts_%s` WHERE `id` = :id', $targetBoard));
+ $query = prepare(sprintf('SELECT * FROM ``posts_%s`` WHERE `id` = :id', $targetBoard));
$query->bindValue(':id', $_POST['target_thread']);
$query->execute() or error(db_error($query)); // If it fails, thread probably does not exist
$post['op'] = false;
@@ -1077,7 +1077,7 @@ function mod_move_reply($originBoard, $postID) {
openBoard($targetBoard);
// Find new thread on our target board
- $query = prepare(sprintf('SELECT thread FROM `posts_%s` WHERE `id` = :id', $targetBoard));
+ $query = prepare(sprintf('SELECT thread FROM ``posts_%s`` WHERE `id` = :id', $targetBoard));
$query->bindValue(':id', $newID);
$query->execute() or error(db_error($query));
$post = $query->fetch(PDO::FETCH_ASSOC);
@@ -1467,7 +1467,7 @@ function mod_spoiler_image($board, $post) {
error($config['error']['noaccess']);
// Delete file
- $query = prepare(sprintf("UPDATE `posts_%s` SET `thumb` = :thumb, `thumbwidth` = :thumbwidth, `thumbheight` = :thumbheight WHERE `id` = :id", $board));
+ $query = prepare(sprintf("UPDATE ``posts_%s`` SET `thumb` = :thumb, `thumbwidth` = :thumbwidth, `thumbheight` = :thumbheight WHERE `id` = :id", $board));
$query->bindValue(':thumb', "spoiler");
$query->bindValue(':thumbwidth', 128, PDO::PARAM_INT);
$query->bindValue(':thumbheight', 128, PDO::PARAM_INT);