aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul S. Owen <psotfx@users.sourceforge.net>2001-12-31 21:59:34 +0000
committerPaul S. Owen <psotfx@users.sourceforge.net>2001-12-31 21:59:34 +0000
commit2f32f10343846d27be4f02c43adc7e4941c8f762 (patch)
tree2117cf8660b55f8eeb853cecfeef9ebba22fc7b5
parent80b31fa3ab4b9c8903b5cb9c0164bffdafac6e25 (diff)
downloadforums-2f32f10343846d27be4f02c43adc7e4941c8f762.tar
forums-2f32f10343846d27be4f02c43adc7e4941c8f762.tar.gz
forums-2f32f10343846d27be4f02c43adc7e4941c8f762.tar.bz2
forums-2f32f10343846d27be4f02c43adc7e4941c8f762.tar.xz
forums-2f32f10343846d27be4f02c43adc7e4941c8f762.zip
Fixed bug #498191
git-svn-id: file:///svn/phpbb/trunk@1756 89ea8834-ac86-4346-8a33-228a782c2dd0
-rw-r--r--phpBB/upgrade.php23
1 files changed, 13 insertions, 10 deletions
diff --git a/phpBB/upgrade.php b/phpBB/upgrade.php
index 1d9fa676f7..ad1c7eb785 100644
--- a/phpBB/upgrade.php
+++ b/phpBB/upgrade.php
@@ -834,19 +834,22 @@ if( !empty($next) )
$post_total = $db->sql_numrows($result);
- $post_id_ary = array();
- while( $row = $db->sql_fetchrow($result) )
+ if( $post_total )
{
- $post_id_ary[] = $row['post_id'];
- }
+ $post_id_ary = array();
+ while( $row = $db->sql_fetchrow($result) )
+ {
+ $post_id_ary[] = $row['post_id'];
+ }
- $sql = "DELETE FROM " . POSTS_TABLE . "
- WHERE post_id IN (" . implode(", ", $post_id_ary) . ")";
- query($sql, "Couldn't update posts to remove deleted user poster_id values");
+ $sql = "DELETE FROM " . POSTS_TABLE . "
+ WHERE post_id IN (" . implode(", ", $post_id_ary) . ")";
+ query($sql, "Couldn't update posts to remove deleted user poster_id values");
- $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
- WHERE post_id IN (" . implode(", ", $post_id_ary) . ")";
- query($sql, "Couldn't update posts to remove deleted user poster_id values");
+ $sql = "DELETE FROM " . POSTS_TEXT_TABLE . "
+ WHERE post_id IN (" . implode(", ", $post_id_ary) . ")";
+ query($sql, "Couldn't update posts to remove deleted user poster_id values");
+ }
echo "Removed $post_total posts ... Done<br />\n";
end_step('convert_users');