aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/admin/admin_groups.php
diff options
context:
space:
mode:
authorJames Atkinson <thefinn@users.sourceforge.net>2001-08-31 20:32:44 +0000
committerJames Atkinson <thefinn@users.sourceforge.net>2001-08-31 20:32:44 +0000
commitddf104d7817deb77c92de40653790ceab64f2c45 (patch)
tree49f1f8c1c78699d5510113b76e4dcf689f896332 /phpBB/admin/admin_groups.php
parent6d77d2348e36a72f1b965330b6bddf63395158cd (diff)
downloadforums-ddf104d7817deb77c92de40653790ceab64f2c45.tar
forums-ddf104d7817deb77c92de40653790ceab64f2c45.tar.gz
forums-ddf104d7817deb77c92de40653790ceab64f2c45.tar.bz2
forums-ddf104d7817deb77c92de40653790ceab64f2c45.tar.xz
forums-ddf104d7817deb77c92de40653790ceab64f2c45.zip
Fixes for bugs 457239 and 457301
git-svn-id: file:///svn/phpbb/trunk@955 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin/admin_groups.php')
-rw-r--r--phpBB/admin/admin_groups.php20
1 files changed, 7 insertions, 13 deletions
diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php
index 76259e7f24..c0a5c0d336 100644
--- a/phpBB/admin/admin_groups.php
+++ b/phpBB/admin/admin_groups.php
@@ -186,7 +186,6 @@ else if( $HTTP_POST_VARS['updategroup'] == "update" )
'" . $group_moderator . "',
'0'
)";
-
break;
case 'default':
@@ -200,13 +199,8 @@ else if( $HTTP_POST_VARS['updategroup'] == "update" )
}
if ( $mode == "newgroup" )
{
- $sql = "SELECT * FROM " . GROUPS_TABLE . "
- WHERE group_name = '" . $group_name . "'";
- if ( !$result = $db->sql_query($sql) )
- {
- $error = TRUE;
- }
- $group_info = $db->sql_fetchrow($result);
+ $new_group_id = $db->sql_nextid($result);
+
$sql = "INSERT INTO " . USER_GROUP_TABLE . "
(
group_id,
@@ -215,8 +209,8 @@ else if( $HTTP_POST_VARS['updategroup'] == "update" )
)
VALUES
(
- '" . $group_info['group_id'] . "',
- '" . $group_info['group_moderator'] . "',
+ '" . $new_group_id . "',
+ '" . $group_moderator . "',
'0'
)";
if ( !$result = $db->sql_query($sql) )
@@ -226,11 +220,11 @@ else if( $HTTP_POST_VARS['updategroup'] == "update" )
}
if ( isset($error) )
{
- message_die(GENERAL_ERROR, $lang['Error_updating_groups'], __LINE__, __FILE__, $sql);
+ message_die(GENERAL_ERROR, $lang['Error_updating_groups'], $lang['Error'], __LINE__, __FILE__, $sql);
}
else
{
- message_die(GENERALL_MESSAGE, $lang['Success_updating_groups']);
+ message_die(GENERAL_MESSAGE, $lang['Success_updating_groups'], $lang['Success']);
}
}
else
@@ -268,6 +262,6 @@ else
$template->pparse('body');
}
-include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
+include('page_footer_admin.'.$phpEx);
?> \ No newline at end of file