This commit is contained in:
czaks 2015-03-10 13:03:47 +01:00
parent 429c9f890f
commit fe7e9c5103

View File

@ -2482,7 +2482,7 @@ function link_for($post, $page50 = false, $foreignlink = false, $thread = false)
if (!$thread) {
// Oh fuck, we'd better optimize it ASAP
$query = prepare(sprintf("SELECT `slug` FROM ``posts_%s`` WHERE `id` = :id", $board['uri']));
$query = prepare(sprintf("SELECT `slug` FROM ``posts_%s`` WHERE `id` = :id", $b['uri']));
$query->bindValue(':id', $id, PDO::PARAM_INT);
$query->execute() or error(db_error($query));