Vergleich memberlist.php - 1.8.17 - 1.8.23

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 40Zeile 40
	add_breadcrumb($lang->nav_memberlist_search);

$contact_fields = array();

	add_breadcrumb($lang->nav_memberlist_search);

$contact_fields = array();

	foreach(array('skype', 'google', 'yahoo', 'icq') as $field)

	foreach(array('skype', 'google', 'icq') as $field)

	{
$contact_fields[$field] = '';
$settingkey = 'allow'.$field.'field';

	{
$contact_fields[$field] = '';
$settingkey = 'allow'.$field.'field';

Zeile 151Zeile 151
		$mybb->input['order'] = "descending";
}
$order_check[$mybb->input['order']] = " checked=\"checked\"";

		$mybb->input['order'] = "descending";
}
$order_check[$mybb->input['order']] = " checked=\"checked\"";

 

if($sort_field == 'u.lastactive' && $mybb->usergroup['canviewwolinvis'] == 0)
{
$sort_field = "u.invisible ASC, CASE WHEN u.invisible = 1 THEN u.regdate ELSE u.lastactive END";
}


// Incoming results per page?
$mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT);


// Incoming results per page?
$mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT);

Zeile 161Zeile 166
	else if($mybb->settings['membersperpage'])
{
$per_page = $mybb->input['perpage'] = (int)$mybb->settings['membersperpage'];

	else if($mybb->settings['membersperpage'])
{
$per_page = $mybb->input['perpage'] = (int)$mybb->settings['membersperpage'];

	}

	}

	else
{
$per_page = $mybb->input['perpage'] = 20;

	else
{
$per_page = $mybb->input['perpage'] = 20;

	}


	}


	$search_query = '1=1';
$search_url = "";

switch($db->type)

	$search_query = '1=1';
$search_url = "";

switch($db->type)

	{

	{

		// PostgreSQL's LIKE is case sensitive
case "pgsql":
$like = "ILIKE";

		// PostgreSQL's LIKE is case sensitive
case "pgsql":
$like = "ILIKE";

Zeile 191Zeile 196
		else if(strlen($letter) == 1)
{
$search_query .= " AND u.username {$like} '".$db->escape_string_like($letter)."%'";

		else if(strlen($letter) == 1)
{
$search_query .= " AND u.username {$like} '".$db->escape_string_like($letter)."%'";

		}

		}

		$search_url .= "&letter={$letter}";
}

		$search_url .= "&letter={$letter}";
}





	// Searching for a matching username
$search_username = htmlspecialchars_uni(trim($mybb->get_input('username')));
if($search_username != '')

	// Searching for a matching username
$search_username = htmlspecialchars_uni(trim($mybb->get_input('username')));
if($search_username != '')

Zeile 203Zeile 208

// Name begins with
if($mybb->input['username_match'] == "begins")


// Name begins with
if($mybb->input['username_match'] == "begins")

		{

		{

			$search_query .= " AND u.username {$like} '".$username_like_query."%'";
$search_url .= "&username_match=begins";

			$search_query .= " AND u.username {$like} '".$username_like_query."%'";
$search_url .= "&username_match=begins";

		}

		}

		// Just contains

		// Just contains

 
		else if($mybb->input['username_match'] == "contains")
{
$search_query .= " AND u.username {$like} '%".$username_like_query."%'";
$search_url .= "&username_match=contains";
}
// Exact

		else
{

		else
{

			$search_query .= " AND u.username {$like} '%".$username_like_query."%'";

			$search_query .= " AND u.username='{$username_like_query}'";

		}

$search_url .= "&username=".urlencode($search_username);

		}

$search_url .= "&username=".urlencode($search_username);

Zeile 226Zeile 237
	}

// Search by contact field input

	}

// Search by contact field input

	foreach(array('icq', 'google', 'skype', 'yahoo') as $cfield)

	foreach(array('icq', 'google', 'skype') as $cfield)

	{
$csetting = 'allow'.$cfield.'field';
$mybb->input[$cfield] = trim($mybb->get_input($cfield));

	{
$csetting = 'allow'.$cfield.'field';
$mybb->input[$cfield] = trim($mybb->get_input($cfield));

Zeile 272Zeile 283

$group = array();
foreach($usergroups_cache as $gid => $groupcache)


$group = array();
foreach($usergroups_cache as $gid => $groupcache)

	{

	{

		if($groupcache['showmemberlist'] == 0)
{
$group[] = (int)$gid;

		if($groupcache['showmemberlist'] == 0)
{
$group[] = (int)$gid;

		}
}


		}
}


	if(is_array($group) && !empty($group))

	if(is_array($group) && !empty($group))

	{
$hiddengroup = implode(',', $group);


	{
$hiddengroup = implode(',', $group);


		$search_query .= " AND u.usergroup NOT IN ({$hiddengroup})";

foreach($group as $hidegid)

		$search_query .= " AND u.usergroup NOT IN ({$hiddengroup})";

foreach($group as $hidegid)

Zeile 292Zeile 303
				case "pgsql":
case "sqlite":
$search_query .= " AND ','||u.additionalgroups||',' NOT LIKE '%,{$hidegid},%'";

				case "pgsql":
case "sqlite":
$search_query .= " AND ','||u.additionalgroups||',' NOT LIKE '%,{$hidegid},%'";

					break;

					break;

				default:
$search_query .= " AND CONCAT(',',u.additionalgroups,',') NOT LIKE '%,{$hidegid},%'";
break;

				default:
$search_query .= " AND CONCAT(',',u.additionalgroups,',') NOT LIKE '%,{$hidegid},%'";
break;

Zeile 302Zeile 313
  
$sorturl = htmlspecialchars_uni("memberlist.php?perpage={$mybb->input['perpage']}{$search_url}");
$search_url = htmlspecialchars_uni("memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}{$search_url}");

  
$sorturl = htmlspecialchars_uni("memberlist.php?perpage={$mybb->input['perpage']}{$search_url}");
$search_url = htmlspecialchars_uni("memberlist.php?sort={$mybb->input['sort']}&order={$mybb->input['order']}&perpage={$mybb->input['perpage']}{$search_url}");





	$plugins->run_hooks('memberlist_intermediate');

$query = $db->simple_select("users u", "COUNT(*) AS users", "{$search_query}");

	$plugins->run_hooks('memberlist_intermediate');

$query = $db->simple_select("users u", "COUNT(*) AS users", "{$search_query}");

Zeile 312Zeile 323
	if($page && $page > 0)
{
$start = ($page - 1) * $per_page;

	if($page && $page > 0)
{
$start = ($page - 1) * $per_page;

	}







		$pages = ceil($num_users / $per_page);
if($page > $pages)
{
$start = 0;
$page = 1;
}
}

	else
{
$start = 0;
$page = 1;

	else
{
$start = 0;
$page = 1;

	}

	}


$sort = htmlspecialchars_uni($mybb->input['sort']);
eval("\$orderarrow['{$sort}'] = \"".$templates->get("memberlist_orderarrow")."\";");


$sort = htmlspecialchars_uni($mybb->input['sort']);
eval("\$orderarrow['{$sort}'] = \"".$templates->get("memberlist_orderarrow")."\";");

Zeile 327Zeile 344
	{
$colspan = 7;
eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");

	{
$colspan = 7;
eval("\$referral_header = \"".$templates->get("memberlist_referrals")."\";");

	}

	}


$multipage = multipage($num_users, $per_page, $page, $search_url);



$multipage = multipage($num_users, $per_page, $page, $search_url);


Zeile 352Zeile 369
		$user = $plugins->run_hooks("memberlist_user", $user);

$alt_bg = alt_trow();

		$user = $plugins->run_hooks("memberlist_user", $user);

$alt_bg = alt_trow();





		$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);

$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

		$user['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);

$user['profilelink'] = build_profile_link($user['username'], $user['uid']);

Zeile 365Zeile 382
		else
{
$usergroup = usergroup_permissions(1);

		else
{
$usergroup = usergroup_permissions(1);

		}

$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");

		}

$displaygroupfields = array("title", "description", "namestyle", "usertitle", "stars", "starimage", "image");


if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];


if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];

		}

		}


$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))


$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))

Zeile 382Zeile 399

// Build referral?
if($mybb->settings['usereferrals'] == 1)


// Build referral?
if($mybb->settings['usereferrals'] == 1)

		{








		{
$referral_count = (int) $user['referrals'];
if($referral_count > 0)
{
$uid = (int) $user['uid'];
eval("\$user['referrals'] = \"".$templates->get('member_referrals_link')."\";");
}


			eval("\$referral_bit = \"".$templates->get("memberlist_referrals_bit")."\";");
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");
}

			eval("\$referral_bit = \"".$templates->get("memberlist_referrals_bit")."\";");
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");
}

Zeile 392Zeile 416
		if(!empty($usergroup['image']))
{
if(!empty($mybb->user['language']))

		if(!empty($usergroup['image']))
{
if(!empty($mybb->user['language']))

			{

			{

				$language = $mybb->user['language'];
}
else

				$language = $mybb->user['language'];
}
else

Zeile 402Zeile 426
			$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']);
$usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
eval("\$usergroup['groupimage'] = \"".$templates->get("memberlist_user_groupimage")."\";");

			$usergroup['image'] = str_replace("{lang}", $language, $usergroup['image']);
$usergroup['image'] = str_replace("{theme}", $theme['imgdir'], $usergroup['image']);
eval("\$usergroup['groupimage'] = \"".$templates->get("memberlist_user_groupimage")."\";");

		}

		}


$has_custom_title = 0;
if(trim($user['usertitle']) != "")


$has_custom_title = 0;
if(trim($user['usertitle']) != "")

Zeile 432Zeile 456
		}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);

		}

$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);





		if(!empty($usergroup['stars']))
{
$user['stars'] = $usergroup['stars'];

		if(!empty($usergroup['stars']))
{
$user['stars'] = $usergroup['stars'];

		}


		}


		if(empty($user['starimage']))
{
$user['starimage'] = $usergroup['starimage'];

		if(empty($user['starimage']))
{
$user['starimage'] = $usergroup['starimage'];

		}


		}


		$user['userstars'] = '';
if(!empty($user['starimage']))
{

		$user['userstars'] = '';
if(!empty($user['starimage']))
{

Zeile 452Zeile 476
			for($i = 0; $i < $user['stars']; ++$i)
{
eval("\$user['userstars'] .= \"".$templates->get("memberlist_user_userstar", 1, 0)."\";");

			for($i = 0; $i < $user['stars']; ++$i)
{
eval("\$user['userstars'] .= \"".$templates->get("memberlist_user_userstar", 1, 0)."\";");

			}

			}

		}

if($user['userstars'] && $usergroup['groupimage'])

		}

if($user['userstars'] && $usergroup['groupimage'])

Zeile 464Zeile 488
		$useravatar = format_avatar($user['avatar'], $user['avatardimensions'], my_strtolower($mybb->settings['memberlistmaxavatarsize']));
eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");


		$useravatar = format_avatar($user['avatar'], $user['avatardimensions'], my_strtolower($mybb->settings['memberlistmaxavatarsize']));
eval("\$user['avatar'] = \"".$templates->get("memberlist_user_avatar")."\";");


		if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])


		$last_seen = max(array($user['lastactive'], $user['lastvisit']));
if(empty($last_seen))

		{
$user['lastvisit'] = $lang->lastvisit_never;

		{
$user['lastvisit'] = $lang->lastvisit_never;


if($user['lastvisit'])
{
// We have had at least some active time, hide it instead
$user['lastvisit'] = $lang->lastvisit_hidden;
}

 
		}
else
{

		}
else
{

			$user['lastvisit'] = my_date('relative', $user['lastactive']);









			// We have some stamp here
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] != 1 && $user['uid'] != $mybb->user['uid'])
{
$user['lastvisit'] = $lang->lastvisit_hidden;
}
else
{
$user['lastvisit'] = my_date('relative', $last_seen);
}

		}

$user['regdate'] = my_date('relative', $user['regdate']);

		}

$user['regdate'] = my_date('relative', $user['regdate']);