forked from leftypol/leftypol
Merge branch 'master' of https://github.com/savetheinternet/Tinyboard
This commit is contained in:
commit
168a4d73cc
20 changed files with 202 additions and 173 deletions
10
post.php
10
post.php
|
@ -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]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue