aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_posting.php
diff options
context:
space:
mode:
authorGraham Eames <grahamje@users.sourceforge.net>2006-09-08 18:00:38 +0000
committerGraham Eames <grahamje@users.sourceforge.net>2006-09-08 18:00:38 +0000
commit6568ab756c636490ce74c5beb63b53a353e49fbe (patch)
treeb717bad16bc567c6df4a86ccb5d49ec71fc3ea08 /phpBB/includes/functions_posting.php
parentb150ed03248ab577fdf61db0f23156fc09d597b4 (diff)
downloadforums-6568ab756c636490ce74c5beb63b53a353e49fbe.tar
forums-6568ab756c636490ce74c5beb63b53a353e49fbe.tar.gz
forums-6568ab756c636490ce74c5beb63b53a353e49fbe.tar.bz2
forums-6568ab756c636490ce74c5beb63b53a353e49fbe.tar.xz
forums-6568ab756c636490ce74c5beb63b53a353e49fbe.zip
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
Diffstat (limited to 'phpBB/includes/functions_posting.php')
-rw-r--r--phpBB/includes/functions_posting.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php
index a8c7078057..1bc07debe1 100644
--- a/phpBB/includes/functions_posting.php
+++ b/phpBB/includes/functions_posting.php
@@ -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']) . "'";