aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_admin.php
diff options
context:
space:
mode:
authorLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-06-19 15:29:53 +0000
committerLudovic Arnaud <ludovic_arnaud@users.sourceforge.net>2003-06-19 15:29:53 +0000
commit0c14f1d4697a770a32bb16621d3350a0b1e00f1e (patch)
tree503fab58f839229f42f79ce99e6a0a4f35fa58ed /phpBB/includes/functions_admin.php
parent5287a27653db9a302f37401ce9db9e73b97d3dda (diff)
downloadforums-0c14f1d4697a770a32bb16621d3350a0b1e00f1e.tar
forums-0c14f1d4697a770a32bb16621d3350a0b1e00f1e.tar.gz
forums-0c14f1d4697a770a32bb16621d3350a0b1e00f1e.tar.bz2
forums-0c14f1d4697a770a32bb16621d3350a0b1e00f1e.tar.xz
forums-0c14f1d4697a770a32bb16621d3350a0b1e00f1e.zip
This checkin is sponsored by AOL
git-svn-id: file:///svn/phpbb/trunk@4144 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions_admin.php')
-rw-r--r--phpBB/includes/functions_admin.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/phpBB/includes/functions_admin.php b/phpBB/includes/functions_admin.php
index 8ce0975dc8..688240360d 100644
--- a/phpBB/includes/functions_admin.php
+++ b/phpBB/includes/functions_admin.php
@@ -663,11 +663,13 @@ function sync($mode, $where_type = '', $where_ids = '', $resync_parents = FALSE,
}
}
- $sql = 'UPDATE ' . TOPICS_TABLE . '
- SET topic_reported = 1 - topic_reported
- WHERE topic_id IN (' . implode(', ', $topic_ids) . ')';
- $db->sql_query($sql);
- unset($topic_ids);
+ if (count($topic_ids))
+ {
+ $sql = 'UPDATE ' . TOPICS_TABLE . '
+ SET topic_reported = 1 - topic_reported
+ WHERE topic_id IN (' . implode(', ', $topic_ids) . ')';
+ $db->sql_query($sql);
+ }
}
$db->sql_freeresult($result);