summaryrefslogtreecommitdiff
path: root/inc/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.php')
-rw-r--r--inc/functions.php11
1 files changed, 2 insertions, 9 deletions
diff --git a/inc/functions.php b/inc/functions.php
index b8198522..9d55f2f2 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -689,22 +689,15 @@ function displayBan($ban) {
}
$ban['ip'] = $_SERVER['REMOTE_ADDR'];
+
if ($ban['post'] && isset($ban['post']['board'], $ban['post']['id'])) {
if (openBoard($ban['post']['board'])) {
-
- $query = query(sprintf("SELECT `thumb`, `file` FROM ``posts_%s`` WHERE `id` = " .
+ $query = query(sprintf("SELECT `files` FROM ``posts_%s`` WHERE `id` = " .
(int)$ban['post']['id'], $board['uri']));
if ($_post = $query->fetch(PDO::FETCH_ASSOC)) {
$ban['post'] = array_merge($ban['post'], $_post);
- } else {
- $ban['post']['file'] = 'deleted';
- $ban['post']['thumb'] = false;
}
- } else {
- $ban['post']['file'] = 'deleted';
- $ban['post']['thumb'] = false;
}
-
if ($ban['post']['thread']) {
$post = new Post($ban['post']);
} else {