mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 08:47:45 +02:00
Next phase of last post changes + a few minor bugs
Note: This template variable is available but will not be used by default git-svn-id: file:///svn/phpbb/trunk@6360 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -139,6 +139,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
foreach ($empty_forums as $void => $forum_id)
|
||||
{
|
||||
$update_sql[$forum_id][] = 'forum_last_post_id = 0';
|
||||
$update_sql[$forum_id][] = "forum_last_post_subject = ''";
|
||||
$update_sql[$forum_id][] = 'forum_last_post_time = 0';
|
||||
$update_sql[$forum_id][] = 'forum_last_poster_id = 0';
|
||||
$update_sql[$forum_id][] = "forum_last_poster_name = ''";
|
||||
@@ -148,7 +149,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
|
||||
if (sizeof($last_post_ids))
|
||||
{
|
||||
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
$sql = 'SELECT p.' . $type . '_id, p.post_id, p.post_subject, p.post_time, p.poster_id, p.post_username, u.user_id, u.username, u.user_colour
|
||||
FROM ' . POSTS_TABLE . ' p, ' . USERS_TABLE . ' u
|
||||
WHERE p.poster_id = u.user_id
|
||||
AND ' . $db->sql_in_set('p.post_id', $last_post_ids);
|
||||
@@ -157,6 +158,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_post_subject = '" . $db->sql_escape($row['post_subject']) . "'";
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_time = ' . (int) $row['post_time'];
|
||||
$update_sql[$row["{$type}_id"]][] = $type . '_last_poster_id = ' . (int) $row['poster_id'];
|
||||
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_colour = '" . $db->sql_escape($row['user_colour']) . "'";
|
||||
|
Reference in New Issue
Block a user