mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
Ok, it's that time again! Well, in preparation for the release of 2.0.2, I
have created the update file. The update has a schema change in the phpbb_groups table; the group id is now auto-increment. This should solve a problem in upgrade.php, as well as make some scripts a little more efficient. The update script will take care of the required changes, as none of the PHP files mentioned above will work without the group_id set as auto_increment. That's all for now! dougk_ff7 git-svn-id: file:///svn/phpbb/branches/phpBB-2_0_0@2796 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -284,18 +284,8 @@ else if ( isset($HTTP_POST_VARS['group_update']) )
|
||||
}
|
||||
else if( $mode == 'newgroup' )
|
||||
{
|
||||
$sql = "SELECT MAX(group_id) AS new_group_id
|
||||
FROM " . GROUPS_TABLE;
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
$new_group_id = $row['new_group_id'] + 1;
|
||||
|
||||
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_type, group_name, group_description, group_moderator, group_single_user)
|
||||
VALUES ($new_group_id, $group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
|
||||
$sql = "INSERT INTO " . GROUPS_TABLE . " (group_type, group_name, group_description, group_moderator, group_single_user)
|
||||
VALUES ($group_type, '" . str_replace("\'", "''", $group_name) . "', '" . str_replace("\'", "''", $group_description) . "', $group_moderator, '0')";
|
||||
if ( !$db->sql_query($sql) )
|
||||
{
|
||||
message_die(GENERAL_ERROR, 'Could not insert new group', '', __LINE__, __FILE__, $sql);
|
||||
|
Reference in New Issue
Block a user