diff options
| author | czaks <marcin@6irc.net> | 2013-08-01 00:47:33 -0400 |
|---|---|---|
| committer | czaks <marcin@6irc.net> | 2013-08-01 00:47:33 -0400 |
| commit | 168a4d73cc2c47cd9039ff466b03fb6812fbb677 (patch) | |
| tree | 418a3d3ba99739fcb4765f914de44b6ecc3f104a /post.php | |
| parent | cefd5517ac1a532214ac2f47485f63958c87ce25 (diff) | |
| parent | 5bf0e7f7e76cd3610e0aa692e0c433aca594ee51 (diff) | |
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
Diffstat (limited to 'post.php')
| -rw-r--r-- | post.php | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -48,7 +48,7 @@ if (isset($_POST['delete'])) { error($config['error']['nodelete']); foreach ($delete as &$id) { - $query = prepare(sprintf("SELECT `thread`, `time`,`password` FROM `posts_%s` WHERE `id` = :id", $board['uri'])); + $query = prepare(sprintf("SELECT `thread`, `time`,`password` FROM ``posts_%s`` WHERE `id` = :id", $board['uri'])); $query->bindValue(':id', $id, PDO::PARAM_INT); $query->execute() or error(db_error($query)); @@ -112,7 +112,7 @@ if (isset($_POST['delete'])) { markup($reason); foreach ($report as &$id) { - $query = prepare(sprintf("SELECT `thread` FROM `posts_%s` WHERE `id` = :id", $board['uri'])); + $query = prepare(sprintf("SELECT `thread` FROM ``posts_%s`` WHERE `id` = :id", $board['uri'])); $query->bindValue(':id', $id, PDO::PARAM_INT); $query->execute() or error(db_error($query)); @@ -124,7 +124,7 @@ if (isset($_POST['delete'])) { '/' . $board['dir'] . $config['dir']['res'] . sprintf($config['file_page'], $thread ? $thread : $id) . ($thread ? '#' . $id : '') . ' for "' . $reason . '"' ); - $query = prepare("INSERT INTO `reports` VALUES (NULL, :time, :ip, :board, :post, :reason)"); + $query = prepare("INSERT INTO ``reports`` VALUES (NULL, :time, :ip, :board, :post, :reason)"); $query->bindValue(':time', time(), PDO::PARAM_INT); $query->bindValue(':ip', $_SERVER['REMOTE_ADDR'], PDO::PARAM_STR); $query->bindValue(':board', $board['uri'], PDO::PARAM_INT); @@ -229,7 +229,7 @@ if (isset($_POST['delete'])) { //Check if thread exists if (!$post['op']) { - $query = prepare(sprintf("SELECT `sticky`,`locked`,`sage` FROM `posts_%s` WHERE `id` = :id AND `thread` IS NULL LIMIT 1", $board['uri'])); + $query = prepare(sprintf("SELECT `sticky`,`locked`,`sage` FROM ``posts_%s`` WHERE `id` = :id AND `thread` IS NULL LIMIT 1", $board['uri'])); $query->bindValue(':id', $post['thread'], PDO::PARAM_INT); $query->execute() or error(db_error()); @@ -585,7 +585,7 @@ if (isset($_POST['delete'])) { if (isset($post['tracked_cites'])) { foreach ($post['tracked_cites'] as $cite) { - $query = prepare('INSERT INTO `cites` VALUES (:board, :post, :target_board, :target)'); + $query = prepare('INSERT INTO ``cites`` VALUES (:board, :post, :target_board, :target)'); $query->bindValue(':board', $board['uri']); $query->bindValue(':post', $id, PDO::PARAM_INT); $query->bindValue(':target_board',$cite[0]); |
