"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Upload/memberlist.php" between
mybb_1821.zip and mybb_1822.zip

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

memberlist.php  (mybb_1821):memberlist.php  (mybb_1822)
skipping to change at line 43 skipping to change at line 43
error_no_permission(); error_no_permission();
} }
// Showing advanced search page? // Showing advanced search page?
if($mybb->get_input('action') == "search") if($mybb->get_input('action') == "search")
{ {
$plugins->run_hooks("memberlist_search"); $plugins->run_hooks("memberlist_search");
add_breadcrumb($lang->nav_memberlist_search); add_breadcrumb($lang->nav_memberlist_search);
$contact_fields = array(); $contact_fields = array();
foreach(array('skype', 'google', 'yahoo', 'icq') as $field) foreach(array('skype', 'google', 'icq') as $field)
{ {
$contact_fields[$field] = ''; $contact_fields[$field] = '';
$settingkey = 'allow'.$field.'field'; $settingkey = 'allow'.$field.'field';
if($mybb->settings[$settingkey] != '' && is_member($mybb->setting s[$settingkey], array('usergroup' => $mybb->usergroup['usergroup'], 'additionalg roups' => $mybb->usergroup['additionalgroups']))) if($mybb->settings[$settingkey] != '' && is_member($mybb->setting s[$settingkey], array('usergroup' => $mybb->usergroup['usergroup'], 'additionalg roups' => $mybb->usergroup['additionalgroups'])))
{ {
$tmpl = 'memberlist_search_'.$field; $tmpl = 'memberlist_search_'.$field;
$lang_string = 'search_'.$field; $lang_string = 'search_'.$field;
$lang_string = $lang->{$lang_string}; $lang_string = $lang->{$lang_string};
skipping to change at line 155 skipping to change at line 155
else else
{ {
$sort_order = "DESC"; $sort_order = "DESC";
$sortordernow = "descending"; $sortordernow = "descending";
$oppsort = $lang->asc; $oppsort = $lang->asc;
$oppsortnext = "ascending"; $oppsortnext = "ascending";
$mybb->input['order'] = "descending"; $mybb->input['order'] = "descending";
} }
$order_check[$mybb->input['order']] = " checked=\"checked\""; $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? // Incoming results per page?
$mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT); $mybb->input['perpage'] = $mybb->get_input('perpage', MyBB::INPUT_INT);
if($mybb->input['perpage'] > 0 && $mybb->input['perpage'] <= 500) if($mybb->input['perpage'] > 0 && $mybb->input['perpage'] <= 500)
{ {
$per_page = $mybb->input['perpage']; $per_page = $mybb->input['perpage'];
} }
else if($mybb->settings['membersperpage']) else if($mybb->settings['membersperpage'])
{ {
$per_page = $mybb->input['perpage'] = (int)$mybb->settings['membe rsperpage']; $per_page = $mybb->input['perpage'] = (int)$mybb->settings['membe rsperpage'];
} }
skipping to change at line 235 skipping to change at line 240
// Website contains // Website contains
$mybb->input['website'] = trim($mybb->get_input('website')); $mybb->input['website'] = trim($mybb->get_input('website'));
$search_website = htmlspecialchars_uni($mybb->input['website']); $search_website = htmlspecialchars_uni($mybb->input['website']);
if(trim($mybb->input['website'])) if(trim($mybb->input['website']))
{ {
$search_query .= " AND u.website {$like} '%".$db->escape_string_l ike($mybb->input['website'])."%'"; $search_query .= " AND u.website {$like} '%".$db->escape_string_l ike($mybb->input['website'])."%'";
$search_url .= "&website=".urlencode($mybb->input['website']); $search_url .= "&website=".urlencode($mybb->input['website']);
} }
// 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'; $csetting = 'allow'.$cfield.'field';
$mybb->input[$cfield] = trim($mybb->get_input($cfield)); $mybb->input[$cfield] = trim($mybb->get_input($cfield));
if($mybb->input[$cfield] && $mybb->settings[$csetting] != '') if($mybb->input[$cfield] && $mybb->settings[$csetting] != '')
{ {
if($mybb->settings[$csetting] != -1) if($mybb->settings[$csetting] != -1)
{ {
$gids = explode(',', (string)$mybb->settings[$cse tting]); $gids = explode(',', (string)$mybb->settings[$cse tting]);
$search_query .= " AND ("; $search_query .= " AND (";
skipping to change at line 486 skipping to change at line 491
if($user['userstars'] && $usergroup['groupimage']) if($user['userstars'] && $usergroup['groupimage'])
{ {
$user['userstars'] = "<br />".$user['userstars']; $user['userstars'] = "<br />".$user['userstars'];
} }
// Show avatar // Show avatar
$useravatar = format_avatar($user['avatar'], $user['avatardimensi ons'], my_strtolower($mybb->settings['memberlistmaxavatarsize'])); $useravatar = format_avatar($user['avatar'], $user['avatardimensi ons'], my_strtolower($mybb->settings['memberlistmaxavatarsize']));
eval("\$user['avatar'] = \"".$templates->get("memberlist_user_ava tar")."\";"); eval("\$user['avatar'] = \"".$templates->get("memberlist_user_ava tar")."\";");
if($user['invisible'] == 1 && $mybb->usergroup['canviewwolinvis'] $last_seen = max(array($user['lastactive'], $user['lastvisit']));
!= 1 && $user['uid'] != $mybb->user['uid']) 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['lastactiv // We have some stamp here
e']); if($user['invisible'] == 1 && $mybb->usergroup['canviewwo
linvis'] != 1 && $user['uid'] != $mybb->user['uid'])
{
$user['lastvisit'] = $lang->lastvisit_hidden;
}
else
{
$user['lastvisit'] = my_date('relative', $last_se
en);
}
} }
$user['regdate'] = my_date('relative', $user['regdate']); $user['regdate'] = my_date('relative', $user['regdate']);
$user['postnum'] = my_number_format($user['postnum']); $user['postnum'] = my_number_format($user['postnum']);
$user['threadnum'] = my_number_format($user['threadnum']); $user['threadnum'] = my_number_format($user['threadnum']);
eval("\$users .= \"".$templates->get("memberlist_user")."\";"); eval("\$users .= \"".$templates->get("memberlist_user")."\";");
} }
// Do we have no results? // Do we have no results?
if(!$users) if(!$users)
 End of changes. 6 change blocks. 
13 lines changed or deleted 22 lines changed or added

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