mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 00:37:42 +02:00
implementing permission roles
- copy permissions (adding groups) - copy permissions (adding forums) - checking proper groupadd/del settings - added intro page to permissions (to give an overview and quick links) - able to select forums + subforums, single forum, all groups, all users (permission screens) - able to reset permissions (only reset input field) - fix forum deletion bug git-svn-id: file:///svn/phpbb/trunk@5574 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1172,7 +1172,7 @@ function avatar_gallery($category, $avatar_select, $items_per_column, $block_var
|
||||
* Add or edit a group. If we're editing a group we only update user
|
||||
* parameters such as rank, etc. if they are changed
|
||||
*/
|
||||
function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
function group_create(&$group_id, $type, $name, $desc, $group_attributes)
|
||||
{
|
||||
global $phpbb_root_path, $config, $db, $user, $file_upload;
|
||||
|
||||
@@ -1228,9 +1228,17 @@ function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
}
|
||||
}
|
||||
|
||||
// Setting the log message before we set the group id (if group gets added)
|
||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||
|
||||
$sql = ($group_id) ? 'UPDATE ' . GROUPS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . " WHERE group_id = $group_id" : 'INSERT INTO ' . GROUPS_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary);
|
||||
$db->sql_query($sql);
|
||||
|
||||
if (!$group_id)
|
||||
{
|
||||
$group_id = $db->sql_nextid();
|
||||
}
|
||||
|
||||
// Set user attributes
|
||||
$sql_ary = array();
|
||||
if (sizeof($group_attributes))
|
||||
@@ -1251,7 +1259,6 @@ function group_create($group_id, $type, $name, $desc, $group_attributes)
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
$log = ($group_id) ? 'LOG_GROUP_UPDATED' : 'LOG_GROUP_CREATED';
|
||||
add_log('admin', $log, $name);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user