"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/managegroup.php" between
mybb_1822.zip and mybb_1823.zip

About: MyBB is a multilingual, standards-compliant and free forum (discussion board) software.

managegroup.php  (mybb_1822):managegroup.php  (mybb_1823)
skipping to change at line 240 skipping to change at line 240
elseif($mybb->input['action'] == "do_manageusers" && $mybb->request_method == "p ost") elseif($mybb->input['action'] == "do_manageusers" && $mybb->request_method == "p ost")
{ {
// Verify incoming POST request // Verify incoming POST request
verify_post_check($mybb->get_input('my_post_key')); verify_post_check($mybb->get_input('my_post_key'));
if($groupleader['canmanagemembers'] == 0) if($groupleader['canmanagemembers'] == 0)
{ {
error_no_permission(); error_no_permission();
} }
$users = $mybb->get_input('removeuser', MyBB::INPUT_ARRAY);
$plugins->run_hooks("managegroup_do_manageusers_start"); $plugins->run_hooks("managegroup_do_manageusers_start");
if(is_array($mybb->get_input('removeuser', MyBB::INPUT_ARRAY))) if(!empty($users))
{ {
foreach($mybb->get_input('removeuser', MyBB::INPUT_ARRAY) as $uid ) foreach($users as $uid)
{ {
leave_usergroup($uid, $gid); leave_usergroup($uid, $gid);
} }
} }
else else
{ {
error($lang->no_users_selected); error($lang->no_users_selected);
} }
$plugins->run_hooks("managegroup_do_manageusers_end"); $plugins->run_hooks("managegroup_do_manageusers_end");
skipping to change at line 382 skipping to change at line 384
switch($db->type) switch($db->type)
{ {
case "pgsql": case "pgsql":
case "sqlite": case "sqlite":
$query = $db->simple_select("users", "*", "','||additiona lgroups||',' LIKE '%,{$gid},%' OR usergroup='{$gid}'", array('order_by' => 'user name', 'limit' => $perpage, 'limit_start' => $start)); $query = $db->simple_select("users", "*", "','||additiona lgroups||',' LIKE '%,{$gid},%' OR usergroup='{$gid}'", array('order_by' => 'user name', 'limit' => $perpage, 'limit_start' => $start));
break; break;
default: default:
$query = $db->simple_select("users", "*", "CONCAT(',',add itionalgroups,',') LIKE '%,{$gid},%' OR usergroup='{$gid}'", array('order_by' => 'username', 'limit' => $perpage, 'limit_start' => $start)); $query = $db->simple_select("users", "*", "CONCAT(',',add itionalgroups,',') LIKE '%,{$gid},%' OR usergroup='{$gid}'", array('order_by' => 'username', 'limit' => $perpage, 'limit_start' => $start));
} }
$removeable_count = 0;
$users = ""; $users = "";
while($user = $db->fetch_array($query)) while($user = $db->fetch_array($query))
{ {
$altbg = alt_trow(); $altbg = alt_trow();
$regdate = my_date('relative', $user['regdate']); $regdate = my_date('relative', $user['regdate']);
$post = $user; $post = $user;
$sendpm = $email = ''; $sendpm = $email = '';
if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false) if($mybb->settings['enablepms'] == 1 && $post['receivepms'] != 0 && $mybb->usergroup['cansendpms'] == 1 && my_strpos(",".$post['ignorelist'].",", ",".$mybb->user['uid'].",") === false)
{ {
eval("\$sendpm = \"".$templates->get("postbit_pm")."\";") ; eval("\$sendpm = \"".$templates->get("postbit_pm")."\";") ;
skipping to change at line 416 skipping to change at line 419
if(in_array($user['uid'], $leaders_array)) if(in_array($user['uid'], $leaders_array))
{ {
$leader = $lang->leader; $leader = $lang->leader;
} }
else else
{ {
$leader = ''; $leader = '';
} }
// Checkbox for user management - only if current user is allowed // Checkbox for user management - only if current user is allowed
$checkbox = ''; $checkbox = $disabled = '';
if($user['usergroup'] == $gid)
{
$disabled = 'disabled="disabled"';
}
else
{
++$removeable_count;
}
if($groupleader['canmanagemembers'] == 1) if($groupleader['canmanagemembers'] == 1)
{ {
eval("\$checkbox = \"".$templates->get("managegroup_user_ checkbox")."\";"); eval("\$checkbox = \"".$templates->get("managegroup_user_ checkbox")."\";");
} }
eval("\$users .= \"".$templates->get("managegroup_user")."\";"); eval("\$users .= \"".$templates->get("managegroup_user")."\";");
} }
if(!$users) if(!$users)
{ {
eval("\$users = \"".$templates->get("managegroup_no_users")."\";" ); eval("\$users = \"".$templates->get("managegroup_no_users")."\";" );
} }
$add_user = ''; $add_user = '';
$remove_users = ''; $remove_users = '';
if($groupleader['canmanagemembers'] == 1) if($groupleader['canmanagemembers'] == 1)
{ {
eval("\$add_user = \"".$templates->get("managegroup_adduser")."\" ;"); eval("\$add_user = \"".$templates->get("managegroup_adduser")."\" ;");
eval("\$remove_users = \"".$templates->get("managegroup_removeuse if($removeable_count)
rs")."\";"); {
eval("\$remove_users = \"".$templates->get("managegroup_r
emoveusers")."\";");
}
} }
if($usergroup['type'] == 5 && $groupleader['caninvitemembers'] == 1) if($usergroup['type'] == 5 && $groupleader['caninvitemembers'] == 1)
{ {
eval("\$invite_user = \"".$templates->get("managegroup_inviteuser ")."\";"); eval("\$invite_user = \"".$templates->get("managegroup_inviteuser ")."\";");
} }
$plugins->run_hooks("managegroup_end"); $plugins->run_hooks("managegroup_end");
eval("\$manageusers = \"".$templates->get("managegroup")."\";"); eval("\$manageusers = \"".$templates->get("managegroup")."\";");
 End of changes. 6 change blocks. 
5 lines changed or deleted 20 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)