Vergleich admin/modules/user/users.php - 1.8.21 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 317Zeile 317
					unset($mybb->input['additionalgroups'][$key]);
}
}

					unset($mybb->input['additionalgroups'][$key]);
}
}

			$additionalgroups = implode(",", $mybb->input['additionalgroups']);

			$additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));

		}
else
{

		}
else
{

Zeile 454Zeile 454
					unset($mybb->input['additionalgroups'][$key]);
}
}

					unset($mybb->input['additionalgroups'][$key]);
}
}

			$additionalgroups = implode(",", $mybb->input['additionalgroups']);

			$additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));

		}
else
{

		}
else
{

Zeile 512Zeile 512
			"profile_fields_editable" => true,
"website" => $mybb->input['website'],
"icq" => $mybb->input['icq'],

			"profile_fields_editable" => true,
"website" => $mybb->input['website'],
"icq" => $mybb->input['icq'],

			"yahoo" => $mybb->input['yahoo'],

 
			"skype" => $mybb->input['skype'],
"google" => $mybb->input['google'],
"birthday" => array(

			"skype" => $mybb->input['skype'],
"google" => $mybb->input['google'],
"birthday" => array(

Zeile 930Zeile 929
	$page->extra_header .= <<<EOF

<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" />

	$page->extra_header .= <<<EOF

<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" />

	<script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1805"></script>
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1821"></script>

	<script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1822"></script>
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1824"></script>

	<script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1805"></script>
EOF;
$page->output_header($lang->edit_user);

	<script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1805"></script>
EOF;
$page->output_header($lang->edit_user);

Zeile 1011Zeile 1010
		}
}
$avatar_top = ceil((126-$scaled_dimensions['height'])/2);

		}
}
$avatar_top = ceil((126-$scaled_dimensions['height'])/2);

	if($user['lastactive'])


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

	{

	{

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

		$last_active = my_date('relative', $last_seen);

	}
else
{

	}
else
{

Zeile 1159Zeile 1159
	$form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
$form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');
$form_container->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq');

	$form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
$form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website');
$form_container->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq');

	$form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo');

 
	$form_container->output_row($lang->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype');
$form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->input['google'], array('id' => 'google')), 'google');


	$form_container->output_row($lang->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype');
$form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->input['google'], array('id' => 'google')), 'google');


Zeile 1997Zeile 1996
			$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");

// Carry over referrals

			$db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");

// Carry over referrals

			$db->update_query("users", array("referrer" => ((int)$source_user['referrer'] + (int)$destination_user['referrer'])), "uid='{$destination_user['uid']}'");
$db->update_query("users", array("referrals" => ((int)$source_user['referrals'] + (int)$destination_user['referrals'])), "uid='{$destination_user['uid']}'");









			$db->update_query("users", array("referrer" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'");
// If destination user has no referrer but source does and source user was not referred by destination user
// or destination user was referred by the source user
if(($destination_user['referrer'] == 0 && $source_user['referrer'] > 0 && $source_user['referrer'] != $destination_user['uid']) || $destination_user['referrer'] == $source_user['uid'])
{
$db->update_query("users", array("referrer" => $source_user['referrer']), "uid='{$destination_user['uid']}'");
}
$query = $db->simple_select("users", "COUNT(uid) as total_referrals", "referrer='{$destination_user['uid']}' AND uid!='{$source_user['uid']}'");
$new_referrals = $db->fetch_field($query, "total_referrals");
$db->update_query("users", array("referrals" => (int)$new_referrals), "uid='{$destination_user['uid']}'");


// Merging Reputation
// First, let's change all the details over to our new user...


// Merging Reputation
// First, let's change all the details over to our new user...

Zeile 2471Zeile 2478
			}

if(is_array($to_update))

			}

if(is_array($to_update))

			{

			{

				$sql_array = implode(",", $to_update);
$db->write_query("UPDATE ".TABLE_PREFIX."users SET usergroup = '2' WHERE uid IN (".$sql_array.")");


				$sql_array = implode(",", $to_update);
$db->write_query("UPDATE ".TABLE_PREFIX."users SET usergroup = '2' WHERE uid IN (".$sql_array.")");


Zeile 2526Zeile 2533
				{
$updated_group = array(
"usergroup" => $ban['oldgroup'],

				{
$updated_group = array(
"usergroup" => $ban['oldgroup'],

						"additionalgroups" => $ban['oldadditionalgroups'],

						"additionalgroups" => $db->escape_string($ban['oldadditionalgroups']),

						"displaygroup" => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid = '".$ban['uid']."'");
$db->delete_query("banned", "uid = '".$ban['uid']."'");
}


						"displaygroup" => $ban['olddisplaygroup']
);
$db->update_query("users", $updated_group, "uid = '".$ban['uid']."'");
$db->delete_query("banned", "uid = '".$ban['uid']."'");
}


				$cache->update_banned();

 
				$cache->update_moderators();

$mybb->input['action'] = "inline_lift";

				$cache->update_moderators();

$mybb->input['action'] = "inline_lift";

Zeile 2605Zeile 2611
							'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => $user['usergroup'],

							'uid' => $user['uid'],
'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT),
'oldgroup' => $user['usergroup'],

							'oldadditionalgroups' => $user['additionalgroups'],

							'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),

							'olddisplaygroup' => $user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

							'olddisplaygroup' => $user['displaygroup'],
'admin' => (int)$mybb->user['uid'],
'dateline' => TIME_NOW,

Zeile 2627Zeile 2633
					$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'");
$db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");


					$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'");
$db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");


					$cache->update_banned();

 
					++$banned_count;
}
$mybb->input['action'] = "inline_banned";

					++$banned_count;
}
$mybb->input['action'] = "inline_banned";

Zeile 2948Zeile 2953
				if(is_array($mybb->input['additionalgroups']))
{
foreach($mybb->input['additionalgroups'] as $key => $gid)

				if(is_array($mybb->input['additionalgroups']))
{
foreach($mybb->input['additionalgroups'] as $key => $gid)

					{

					{

						if($gid == $mybb->input['usergroup'])
{
unset($mybb->input['additionalgroups'][$key]);

						if($gid == $mybb->input['usergroup'])
{
unset($mybb->input['additionalgroups'][$key]);

Zeile 3257Zeile 3262
	// Build the search SQL for users

// List of valid LIKE search fields

	// Build the search SQL for users

// List of valid LIKE search fields

	$user_like_fields = array("username", "email", "website", "icq", "yahoo", "skype", "google", "signature", "usertitle");

	$user_like_fields = array("username", "email", "website", "icq", "skype", "google", "signature", "usertitle");

	foreach($user_like_fields as $search_field)
{
if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])

	foreach($user_like_fields as $search_field)
{
if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])

Zeile 3422Zeile 3427
	if(isset($view['conditions']['usergroup']))
{
if(!is_array($view['conditions']['usergroup']))

	if(isset($view['conditions']['usergroup']))
{
if(!is_array($view['conditions']['usergroup']))

		{

		{

			$view['conditions']['usergroup'] = array($view['conditions']['usergroup']);
}


			$view['conditions']['usergroup'] = array($view['conditions']['usergroup']);
}


Zeile 3461Zeile 3466
	if(isset($view['extra_sql']))
{
$search_sql .= $view['extra_sql'];

	if(isset($view['extra_sql']))
{
$search_sql .= $view['extra_sql'];

	}

	}


// Lets fetch out how many results we have
$query = $db->query("


// Lets fetch out how many results we have
$query = $db->query("

Zeile 3473Zeile 3478

// No matching results then return false
if(!$num_results)


// No matching results then return false
if(!$num_results)

	{

	{

		return false;
}
// Generate the list of results
else
{
if(!$view['perpage'])

		return false;
}
// Generate the list of results
else
{
if(!$view['perpage'])

		{

		{

			$view['perpage'] = 20;
}
$view['perpage'] = (int)$view['perpage'];

			$view['perpage'] = 20;
}
$view['perpage'] = (int)$view['perpage'];

Zeile 3577Zeile 3582
			$user['view']['additionalgroups'] = "<small>{$groups_list}</small>";
$user['view']['email'] = "<a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>";
$user['view']['regdate'] = my_date('relative', $user['regdate']);

			$user['view']['additionalgroups'] = "<small>{$groups_list}</small>";
$user['view']['email'] = "<a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>";
$user['view']['regdate'] = my_date('relative', $user['regdate']);

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









			$last_seen = max(array($user['lastactive'], $user['lastvisit']));
if(!empty($last_seen))
{
$user['view']['lastactive'] = my_date('relative', $last_seen);
}
else
{
$user['view']['lastactive'] = $lang->never;
}


// Build popup menu
$popup = new PopupMenu("user_{$user['uid']}", $lang->options);


// Build popup menu
$popup = new PopupMenu("user_{$user['uid']}", $lang->options);

Zeile 3896Zeile 3909
	}

// And build the final card

	}

// And build the final card

 
	$uname = "";
if(in_array('username', $view['fields']))
{
$uname = $user['view']['username'];
}

	$card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\n";

	$card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\n";

	$card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$user['view']['username']}</legend>\n";

	$card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$uname}</legend>\n";

	if($avatar)
{
$card .= "<div class=\"user_avatar\">{$avatar}</div>\n";

	if($avatar)
{
$card .= "<div class=\"user_avatar\">{$avatar}</div>\n";

Zeile 3966Zeile 3984
 */
function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false)
{

 */
function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false)
{

	global $lang;

	global $lang, $mybb;


if(!is_array($fields))
{


if(!is_array($fields))
{

Zeile 4154Zeile 4172

$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website');
$form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');


$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website');
$form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');

	$form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo');

 
	$form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype');
$form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
$form_container->output_row($lang->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature'))." {$lang->or} ".$form->generate_check_box('conditions[signature_blank]', 1, $lang->is_not_blank, array('id' => 'signature_blank', 'checked' => $input['conditions']['signature_blank'])), 'signature');

	$form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype');
$form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
$form_container->output_row($lang->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature'))." {$lang->or} ".$form->generate_check_box('conditions[signature_blank]', 1, $lang->is_not_blank, array('id' => 'signature_blank', 'checked' => $input['conditions']['signature_blank'])), 'signature');