1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/15540] Add types

PHPBB3-15540
This commit is contained in:
rubencm
2021-03-23 11:51:02 +01:00
parent a8de540e93
commit 658a0489d0
12 changed files with 140 additions and 133 deletions

View File

@@ -1566,7 +1566,7 @@ function mcp_fork_topic($topic_ids)
}
}
$db->sql_query('INSERT INTO ' . POSTS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary));
$new_post_id = $db->sql_nextid();
$new_post_id = (int) $db->sql_nextid();
/**
* Perform actions after forked topic is created.
@@ -1605,7 +1605,7 @@ function mcp_fork_topic($topic_ids)
if (!empty($search))
{
$search->index($search_mode, $new_post_id, $sql_ary['post_text'], $sql_ary['post_subject'], $sql_ary['poster_id'], ($topic_row['topic_type'] == POST_GLOBAL) ? 0 : $to_forum_id);
$search->index($search_mode, $new_post_id, $sql_ary['post_text'], $sql_ary['post_subject'], (int) $sql_ary['poster_id'], ($topic_row['topic_type'] == POST_GLOBAL) ? 0 : $to_forum_id);
$search_mode = 'reply'; // After one we index replies
}

View File

@@ -642,7 +642,7 @@ function split_topic($action, $topic_id, $to_forum_id, $subject)
}
}
$search->index('edit', $first_post_data['post_id'], $first_post_data['post_text'], $subject, $first_post_data['poster_id'], $first_post_data['forum_id']);
$search->index('edit', (int) $first_post_data['post_id'], $first_post_data['post_text'], $subject, (int) $first_post_data['poster_id'], (int) $first_post_data['forum_id']);
}
// Copy topic subscriptions to new topic