Vergleich admin/modules/user/admin_permissions.php - 1.8.15 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 122Zeile 122
	{
foreach($mybb->input['permissions'] as $module => $actions)
{

	{
foreach($mybb->input['permissions'] as $module => $actions)
{

			$no_access = 0;
foreach($actions as $action => $access)

			if(is_array($actions))


			{

			{

				if($access == 0)


				$no_access = 0;
foreach($actions as $action => $access)

				{

				{

					++$no_access;









					if($access == 0)
{
++$no_access;
}
}
// User can't access any actions in this module - just disallow it completely
if($no_access == count($actions))
{
unset($mybb->input['permissions'][$module]);

				}
}

				}
}

			// User can't access any actions in this module - just disallow it completely
if($no_access == count($actions))
{
unset($mybb->input['permissions'][$module]);
}
}


		}







		// Does an options row exist for this admin already?
$query = $db->simple_select("adminoptions", "COUNT(uid) AS existing_options", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
$existing_options = $db->fetch_field($query, "existing_options");
if($existing_options > 0)

		// Does an options row exist for this admin already?
$query = $db->simple_select("adminoptions", "COUNT(uid) AS existing_options", "uid='".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
$existing_options = $db->fetch_field($query, "existing_options");
if($existing_options > 0)

		{

		{

			$db->update_query("adminoptions", array('permissions' => $db->escape_string(my_serialize($mybb->input['permissions']))), "uid = '".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
}
else

			$db->update_query("adminoptions", array('permissions' => $db->escape_string(my_serialize($mybb->input['permissions']))), "uid = '".$mybb->get_input('uid', MyBB::INPUT_INT)."'");
}
else

Zeile 171Zeile 174
			$query = $db->simple_select("usergroups", "title", "gid='{$gid}'");
$group = $db->fetch_array($query);
log_admin_action($uid, $group['title']);

			$query = $db->simple_select("usergroups", "title", "gid='{$gid}'");
$group = $db->fetch_array($query);
log_admin_action($uid, $group['title']);

		}
else

		}
else

		{
// Default
log_admin_action(0);

		{
// Default
log_admin_action(0);

Zeile 214Zeile 217
		$page->add_breadcrumb_item($lang->user_permissions, "index.php?module=user-admin_permissions");
}
elseif($uid < 0)

		$page->add_breadcrumb_item($lang->user_permissions, "index.php?module=user-admin_permissions");
}
elseif($uid < 0)

	{

	{

		$gid = abs($uid);
$query = $db->simple_select("usergroups", "title", "gid='$gid'");
$group = $db->fetch_array($query);

		$gid = abs($uid);
$query = $db->simple_select("usergroups", "title", "gid='$gid'");
$group = $db->fetch_array($query);

Zeile 339Zeile 342
			$perm_type = "default";
}
$uid = -$group['gid'];

			$perm_type = "default";
}
$uid = -$group['gid'];





		$group['title'] = htmlspecialchars_uni($group['title']);

$table->construct_cell("<div class=\"float_right\"><img src=\"styles/{$page->style}/images/icons/{$perm_type}.png\" title=\"{$lang->permissions_type_group}\" alt=\"{$perm_type}\" /></div><div><strong><a href=\"index.php?module=user-admin_permissions&amp;action=edit&amp;uid={$uid}\" title=\"{$lang->edit_group}\">{$group['title']}</a></strong><br /></div>");

		$group['title'] = htmlspecialchars_uni($group['title']);

$table->construct_cell("<div class=\"float_right\"><img src=\"styles/{$page->style}/images/icons/{$perm_type}.png\" title=\"{$lang->permissions_type_group}\" alt=\"{$perm_type}\" /></div><div><strong><a href=\"index.php?module=user-admin_permissions&amp;action=edit&amp;uid={$uid}\" title=\"{$lang->edit_group}\">{$group['title']}</a></strong><br /></div>");

Zeile 446Zeile 449
		");
while($admin = $db->fetch_array($query))
{

		");
while($admin = $db->fetch_array($query))
{

 
			$perm_type = "default";


			if($admin['permissions'] != "")
{
$perm_type = "user";

			if($admin['permissions'] != "")
{
$perm_type = "user";

Zeile 454Zeile 459
			{
$groups = explode(",", $admin['additionalgroups'].",".$admin['usergroup']);
foreach($groups as $group)

			{
$groups = explode(",", $admin['additionalgroups'].",".$admin['usergroup']);
foreach($groups as $group)

				{

				{

					if($group == "") continue;
if($group_permissions[$group] != "")
{
$perm_type = "group";
break;
}

					if($group == "") continue;
if($group_permissions[$group] != "")
{
$perm_type = "group";
break;
}

				}

if(!$group_permissions)
{
$perm_type = "default";

 
				}
}


				}
}