aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorHenry Sudhof <kellanved@phpbb.com>2007-05-19 17:45:12 +0000
committerHenry Sudhof <kellanved@phpbb.com>2007-05-19 17:45:12 +0000
commit6b6be273c180189f99996de6af050cba839fd400 (patch)
treebffc512987a99812c11a4c0e6254e05d8f0dea02 /phpBB/includes
parent05c15edbd297d1e2cace3b42655b2c63fe3e0b54 (diff)
downloadforums-6b6be273c180189f99996de6af050cba839fd400.tar
forums-6b6be273c180189f99996de6af050cba839fd400.tar.gz
forums-6b6be273c180189f99996de6af050cba839fd400.tar.bz2
forums-6b6be273c180189f99996de6af050cba839fd400.tar.xz
forums-6b6be273c180189f99996de6af050cba839fd400.zip
quieter - shouldn't make a difference, but well...
git-svn-id: file:///svn/phpbb/trunk@7648 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions_admin.php49
1 files changed, 27 insertions, 22 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index c93bdf84ab..97fc9ba73b 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -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'];
- $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 (!isset($sync_shadow_topics[$orig_topic_id]))
+ {
+ $sync_shadow_topics[$orig_topic_id] = array();
+ }
- if ($row['post_id'] == $shadow_topic_data[$topic_id]['topic_last_post_id'])
- {
- $orig_topic_id = $shadow_topic_data[$topic_id]['topic_id'];
+ $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 (!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'];
+
+ 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'];
+ $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);