diff options
| author | Fredrick Brennan <admin@8chan.co> | 2014-05-14 13:51:49 -0400 |
|---|---|---|
| committer | Fredrick Brennan <admin@8chan.co> | 2014-05-14 13:51:49 -0400 |
| commit | 9b3f8421fc93f74bbb6156f6963881adca28c387 (patch) | |
| tree | aac91955b43645808162040de28d4ecf29bfa078 | |
| parent | 0da65c3d7b1363ac86acadd5b4ed5301cb33bafb (diff) | |
Fix displaying bans
| -rw-r--r-- | inc/functions.php | 11 | ||||
| -rw-r--r-- | templates/banned.html | 4 |
2 files changed, 4 insertions, 11 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 { diff --git a/templates/banned.html b/templates/banned.html index 1a9a3915..33f9d9f8 100644 --- a/templates/banned.html +++ b/templates/banned.html @@ -83,7 +83,7 @@ {% if post and config.ban_show_post %} <hr> - <p>{% trans %}You were banned for the following post on {% endtrans %}{{ board.url }}:</p> + <p>{% trans %}You were banned for the following post on{% endtrans %} {{ board.url }}:</p> {{ post }} <br> {% endif %} @@ -133,4 +133,4 @@ {% endif %} {% endif %} </div> -{% endfilter %}
\ No newline at end of file +{% endfilter %} |
