mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-24 10:58:55 +00:00
quieter - shouldn't make a difference, but well...
git-svn-id: file:///svn/phpbb/trunk@7648 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
05c15edbd2
commit
6b6be273c1
1 changed files with 28 additions and 23 deletions
|
@ -1820,35 +1820,40 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = false,
|
|||
{
|
||||
$topic_id = (int) $row['topic_id'];
|
||||
|
||||
if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_first_post_id'])
|
||||
// Ok, there should be a shadow topic. If there isn't, then there's something wrong with the db.
|
||||
// However, there's not much we can do about it.
|
||||
if (!empty($shadow_topic_data[$topic_id]))
|
||||
{
|
||||
$orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
|
||||
|
||||
if (!isset($sync_shadow_topics[$orig_topic_id]))
|
||||
if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_first_post_id'])
|
||||
{
|
||||
$sync_shadow_topics[$orig_topic_id] = array();
|
||||
$orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
|
||||
|
||||
if (!isset($sync_shadow_topics[$orig_topic_id]))
|
||||
{
|
||||
$sync_shadow_topics[$orig_topic_id] = array();
|
||||
}
|
||||
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_time'] = $row['post_time'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_poster'] = $row['poster_id'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_first_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_time'] = $row['post_time'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_poster'] = $row['poster_id'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_first_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_first_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
|
||||
if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_last_post_id'])
|
||||
{
|
||||
$orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
|
||||
|
||||
if (!isset($sync_shadow_topics[$orig_topic_id]))
|
||||
if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_last_post_id'])
|
||||
{
|
||||
$sync_shadow_topics[$orig_topic_id] = array();
|
||||
}
|
||||
$orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
|
||||
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_id'] = $row['poster_id'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_post_subject'] = $row['post_subject'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_post_time'] = $row['post_time'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_colour'] = $row['user_colour'];
|
||||
if (!isset($sync_shadow_topics[$orig_topic_id]))
|
||||
{
|
||||
$sync_shadow_topics[$orig_topic_id] = array();
|
||||
}
|
||||
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_id'] = $row['poster_id'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_post_subject'] = $row['post_subject'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_post_time'] = $row['post_time'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_name'] = ($row['poster_id'] == ANONYMOUS) ? $row['post_username'] : $row['username'];
|
||||
$sync_shadow_topics[$orig_topic_id]['topic_last_poster_colour'] = $row['user_colour'];
|
||||
}
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
|
Loading…
Add table
Reference in a new issue