mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-21 16:01:40 +02:00
some 2.0.x fixes for some annoying bugs and some not so annoying ones.
git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@6981 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -626,7 +626,7 @@ if( !empty($mode) )
|
||||
$vote_ids = '';
|
||||
do
|
||||
{
|
||||
$vote_ids = (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
|
||||
$vote_ids .= (($vote_ids != '') ? ', ' : '') . $row['vote_id'];
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
|
||||
|
@@ -109,30 +109,12 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($HTTP_POST_VARS['username'])
|
||||
message_die(GENERAL_ERROR, 'Could not update votes for this user', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "SELECT group_id
|
||||
FROM " . GROUPS_TABLE . "
|
||||
$sql = "UPDATE " . GROUPS_TABLE . "
|
||||
SET group_moderator = " . $userdata['user_id'] . "
|
||||
WHERE group_moderator = $user_id";
|
||||
if( !($result = $db->sql_query($sql)) )
|
||||
if( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not select groups where user was moderator', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
while ( $row_group = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$group_moderator[] = $row_group['group_id'];
|
||||
}
|
||||
|
||||
if ( count($group_moderator) )
|
||||
{
|
||||
$update_moderator_id = implode(', ', $group_moderator);
|
||||
|
||||
$sql = "UPDATE " . GROUPS_TABLE . "
|
||||
SET group_moderator = " . $userdata['user_id'] . "
|
||||
WHERE group_moderator IN ($update_moderator_id)";
|
||||
if( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
message_die(GENERAL_ERROR, 'Could not update group moderators', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM " . USERS_TABLE . "
|
||||
|
Reference in New Issue
Block a user