aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-08-22 11:01:56 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-08-22 11:01:56 +0000
commitb0afc8e6320598734ae20e664be9f840ca501f91 (patch)
tree3d389420e36749440e292f704e8d9e18a3dd246d /phpBB/includes/functions_posting.php
parent556bbfe856e5a36f38a26c3ae8357eeba0d3b228 (diff)
downloadforums-b0afc8e6320598734ae20e664be9f840ca501f91.tar
forums-b0afc8e6320598734ae20e664be9f840ca501f91.tar.gz
forums-b0afc8e6320598734ae20e664be9f840ca501f91.tar.bz2
forums-b0afc8e6320598734ae20e664be9f840ca501f91.tar.xz
forums-b0afc8e6320598734ae20e664be9f840ca501f91.zip
Phase 2 of the changes
This should now be complete git-svn-id: file:///svn/phpbb/trunk@6311 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index 695f821c73..6fc9d83be6 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -139,15 +139,16 @@ 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_time = 0';
+ $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 = ''";
+ $update_sql[$forum_id][] = "forum_last_poster_colour = ''";
}
}
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
+ $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
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);
@@ -158,6 +159,7 @@ function update_post_information($type, $ids, $return_update_sql = false)
$update_sql[$row["{$type}_id"]][] = $type . '_last_post_id = ' . (int) $row['post_id'];
$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']) . "'";
$update_sql[$row["{$type}_id"]][] = "{$type}_last_poster_name = '" . (($row['poster_id'] == ANONYMOUS) ? $db->sql_escape($row['post_username']) : $db->sql_escape($row['username'])) . "'";
}
$db->sql_freeresult($result);