mirror of
https://github.com/vichan-devel/vichan.git
synced 2025-01-31 12:23:48 +01:00
Fix a bug related to deleting boards (see https://github.com/vichan-devel/vichan/issues/331)
This commit is contained in:
parent
3a41c24e6e
commit
e15e966cdb
@ -370,12 +370,12 @@ function mod_edit_board($boardName) {
|
|||||||
|
|
||||||
// Clear reports
|
// Clear reports
|
||||||
$query = prepare('DELETE FROM ``reports`` WHERE `board` = :id');
|
$query = prepare('DELETE FROM ``reports`` WHERE `board` = :id');
|
||||||
$query->bindValue(':id', $board['uri'], PDO::PARAM_INT);
|
$query->bindValue(':id', $board['uri'], PDO::PARAM_STR);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
// Delete from table
|
// Delete from table
|
||||||
$query = prepare('DELETE FROM ``boards`` WHERE `uri` = :uri');
|
$query = prepare('DELETE FROM ``boards`` WHERE `uri` = :uri');
|
||||||
$query->bindValue(':uri', $board['uri'], PDO::PARAM_INT);
|
$query->bindValue(':uri', $board['uri'], PDO::PARAM_STR);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
|
|
||||||
$query = prepare("SELECT `board`, `post` FROM ``cites`` WHERE `target_board` = :board ORDER BY `board`");
|
$query = prepare("SELECT `board`, `post` FROM ``cites`` WHERE `target_board` = :board ORDER BY `board`");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user