mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 05:18:52 +00:00
Merge branch '3.2.x'
This commit is contained in:
commit
3c2ae2cb42
1 changed files with 5 additions and 3 deletions
|
@ -202,11 +202,13 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||||
|
|
||||||
if (count($ids) == 1)
|
if (count($ids) == 1)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT MAX(p.post_id) as last_post_id
|
$sql = 'SELECT p.post_id as last_post_id
|
||||||
FROM ' . POSTS_TABLE . " p $topic_join
|
FROM ' . POSTS_TABLE . " p $topic_join
|
||||||
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
|
WHERE " . $db->sql_in_set('p.' . $type . '_id', $ids) . "
|
||||||
$topic_condition
|
$topic_condition
|
||||||
AND p.post_visibility = " . ITEM_APPROVED;
|
AND p.post_visibility = " . ITEM_APPROVED . "
|
||||||
|
ORDER BY p.post_id DESC";
|
||||||
|
$result = $db->sql_query_limit($sql, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -216,8 +218,8 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||||
$topic_condition
|
$topic_condition
|
||||||
AND p.post_visibility = " . ITEM_APPROVED . "
|
AND p.post_visibility = " . ITEM_APPROVED . "
|
||||||
GROUP BY p.{$type}_id";
|
GROUP BY p.{$type}_id";
|
||||||
|
$result = $db->sql_query($sql);
|
||||||
}
|
}
|
||||||
$result = $db->sql_query($sql);
|
|
||||||
|
|
||||||
$last_post_ids = array();
|
$last_post_ids = array();
|
||||||
while ($row = $db->sql_fetchrow($result))
|
while ($row = $db->sql_fetchrow($result))
|
||||||
|
|
Loading…
Add table
Reference in a new issue