Vergleich memberlist.php - 1.8.15 - 1.8.25

  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('aim', '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 55Zeile 55
			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get('memberlist_search_contact_field').'";');
}

			$bgcolors[$field] = alt_trow();
eval('$contact_fields[\''.$field.'\'] = "'.$templates->get('memberlist_search_contact_field').'";');
}

 
	}

if($mybb->settings['usereferrals'] == 1)
{
eval("\$referrals_option = \"".$templates->get("memberlist_referrals_option")."\";");

	}

eval("\$search_page = \"".$templates->get("memberlist_search")."\";");

	}

eval("\$search_page = \"".$templates->get("memberlist_search")."\";");

Zeile 102Zeile 107
			$sort_field = "u.threadnum";
break;
case "referrals":

			$sort_field = "u.threadnum";
break;
case "referrals":

			$sort_field = "u.referrals";








			if($mybb->settings['usereferrals'] == 1)
{
$sort_field = "u.referrals";
}
else
{
$sort_field = "u.username";
}

			break;
default:
$sort_field = "u.username";

			break;
default:
$sort_field = "u.username";

Zeile 139Zeile 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);
if($mybb->input['perpage'] > 0 && $mybb->input['perpage'] <= 500)


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

	{

	{

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

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

	}

	}

	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'];

Zeile 153Zeile 170
	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 170Zeile 187

// Limiting results to a certain letter
if(isset($mybb->input['letter']))


// Limiting results to a certain letter
if(isset($mybb->input['letter']))

	{

	{

		$letter = chr(ord($mybb->get_input('letter')));
if($mybb->input['letter'] == -1)
{

		$letter = chr(ord($mybb->get_input('letter')));
if($mybb->input['letter'] == -1)
{

Zeile 182Zeile 199
		}
$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 196Zeile 213
			$search_url .= "&username_match=begins";
}
// Just contains

			$search_url .= "&username_match=begins";
}
// 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 214Zeile 237
	}

// Search by contact field input

	}

// Search by contact field input

	foreach(array('aim', '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 298Zeile 321

$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page && $page > 0)


$page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page && $page > 0)

	{

	{

		$start = ($page - 1) * $per_page;

		$start = ($page - 1) * $per_page;

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

	}
else
{

	}
else
{

Zeile 315Zeile 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);

// Cache a few things

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

// Cache a few things

Zeile 340Zeile 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['username'] = format_name(htmlspecialchars_uni($user['username']), $user['usergroup'], $user['displaygroup']);





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

// Get the display usergroup

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

// Get the display usergroup

		if(empty($user['displaygroup']))
{












		if($user['usergroup'])
{
$usergroup = usergroup_permissions($user['usergroup']);
}
else
{
$usergroup = usergroup_permissions(1);
}

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

if(!$user['displaygroup'])
{

			$user['displaygroup'] = $user['usergroup'];
}

			$user['displaygroup'] = $user['usergroup'];
}

		$usergroup = $usergroups_cache[$user['displaygroup']];








$display_group = usergroup_displaygroup($user['displaygroup']);
if(is_array($display_group))
{
$usergroup = array_merge($usergroup, $display_group);
}


		// 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("\$referral_bit = \"".$templates->get("memberlist_referrals_bit")."\";");

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

		}

$usergroup['groupimage'] = '';

		}

$usergroup['groupimage'] = '';

Zeile 435Zeile 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']);