Merge pull request #68 from 0xjove/moving-replies
Fixes bugs preventing replies from being moved.
This commit is contained in:
commit
d3542f22ad
@ -1140,8 +1140,9 @@ function mod_move_reply($originBoard, $postID) {
|
|||||||
|
|
||||||
// build index
|
// build index
|
||||||
buildIndex();
|
buildIndex();
|
||||||
|
|
||||||
// build new thread
|
// build new thread
|
||||||
buildThread($newID);
|
buildThread($post['op'] ? $newID : $post['thread']);
|
||||||
|
|
||||||
// trigger themes
|
// trigger themes
|
||||||
rebuildThemes('post', $targetBoard);
|
rebuildThemes('post', $targetBoard);
|
||||||
@ -1159,7 +1160,7 @@ function mod_move_reply($originBoard, $postID) {
|
|||||||
openBoard($targetBoard);
|
openBoard($targetBoard);
|
||||||
|
|
||||||
// Find new thread on our target board
|
// Find new thread on our target board
|
||||||
$query = prepare(sprintf('SELECT thread FROM ``posts_%s`` WHERE `id` = :id', $targetBoard));
|
$query = prepare(sprintf('SELECT thread, id FROM ``posts_%s`` WHERE `id` = :id', $targetBoard));
|
||||||
$query->bindValue(':id', $newID);
|
$query->bindValue(':id', $newID);
|
||||||
$query->execute() or error(db_error($query));
|
$query->execute() or error(db_error($query));
|
||||||
$post = $query->fetch(PDO::FETCH_ASSOC);
|
$post = $query->fetch(PDO::FETCH_ASSOC);
|
||||||
|
Loading…
Reference in New Issue
Block a user