Vergleich modcp.php - 1.8.21 - 1.8.26

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 2587Zeile 2587
		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"profile_fields_editable" => true,
"website" => $mybb->get_input('website'),
"icq" => $mybb->get_input('icq'),

		"yahoo" => $mybb->get_input('yahoo'),

 
		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

		"skype" => $mybb->get_input('skype'),
"google" => $mybb->get_input('google'),
"signature" => $mybb->get_input('signature'),

Zeile 2689Zeile 2688
					$string = $option['action']."_error";
$errors[] = $lang->$string;
}

					$string = $option['action']."_error";
$errors[] = $lang->$string;
}


if(!is_array($errors))

				else


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


				{
$suspend_length = fetch_time_length((int)$mybb->input[$option['time']], $mybb->input[$option['period']]);


Zeile 2732Zeile 2730
			$errors[] = $lang->suspendmoderate_error;
}


			$errors[] = $lang->suspendmoderate_error;
}


		if(is_array($errors))

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

		{
$mybb->input['action'] = "editprofile";
}

		{
$mybb->input['action'] = "editprofile";
}

Zeile 2743Zeile 2741
			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
if(!empty($extra_user_updates))

			// Continue with the update if there is no errors
$user_info = $userhandler->update_user();
if(!empty($extra_user_updates))

			{

			{

				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

				$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
}
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->edited_user);

Zeile 2795Zeile 2793
	if(!my_validate_url($user['website']))
{
$user['website'] = '';

	if(!my_validate_url($user['website']))
{
$user['website'] = '';

	}


	}


	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	if($user['icq'] != "0")
{
$user['icq'] = (int)$user['icq'];

	}

	}


if(!$errors)


if(!$errors)

	{

	{

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))
{
$birthday[1] = '';

		$mybb->input = array_merge($user, $mybb->input);
$birthday = explode('-', $user['birthday']);
if(!isset($birthday[1]))
{
$birthday[1] = '';

		}

		}

		if(!isset($birthday[2]))
{
$birthday[2] = '';

		if(!isset($birthday[2]))
{
$birthday[2] = '';

Zeile 2822Zeile 2820
	}

// Sanitize all input

	}

// Sanitize all input

	foreach(array('usertitle', 'website', 'icq', 'yahoo', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
{

	foreach(array('usertitle', 'website', 'icq', 'skype', 'google', 'signature', 'birthday_day', 'birthday_month', 'birthday_year') as $field)
{

		$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}


		$mybb->input[$field] = htmlspecialchars_uni($mybb->get_input($field));
}


Zeile 2850Zeile 2848
	$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);

if(empty($user['usertitle']))

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

if(empty($user['usertitle']))

	{

	{

		$lang->current_custom_usertitle = '';
}


		$lang->current_custom_usertitle = '';
}


Zeile 2903Zeile 2901
				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

				$awaydate = my_date($mybb->settings['dateformat'], $user['awaydate']);
$awaycheck[1] = "checked=\"checked\"";
$awaynotice = $lang->sprintf($lang->away_notice_away, $awaydate);

			}
else
{

			}
else
{

				$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";
}

				$awaynotice = $lang->away_notice;
$awaycheck[0] = "checked=\"checked\"";
}

Zeile 2922Zeile 2920
			{
$selected = '';
}

			{
$selected = '';
}





			eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
}


			eval("\$returndatesel .= \"".$templates->get("usercp_profile_day")."\";");
}


Zeile 2932Zeile 2930
			$returndatemonthsel[$month] = '';
}
if(isset($returndate[1]))

			$returndatemonthsel[$month] = '';
}
if(isset($returndate[1]))

		{

		{

			$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
}


			$returndatemonthsel[$returndate[1]] = " selected=\"selected\"";
}


Zeile 2977Zeile 2975
				if(isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

				if(isset($mybb->input['profile_fields'][$field]))
{
$userfield = $mybb->input['profile_fields'][$field];

				}
}
else
{
$userfield = $user_fields[$field];
}
if($type == "multiselect")
{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}

				}
}
else
{
$userfield = $user_fields[$field];
}
if($type == "multiselect")
{
if($errors)
{
$useropts = $userfield;
}
else
{
$useropts = explode("\n", $userfield);
}
if(is_array($useropts))
{
foreach($useropts as $key => $val)
{
$seloptions[$val] = $val;
}
}
$expoptions = explode("\n", $options);
if(is_array($expoptions))
{
foreach($expoptions as $key => $val)
{
$val = trim($val);
$val = str_replace("\n", "\\n", $val);

$sel = "";
if(isset($seloptions[$val]) && $val == $seloptions[$val])
{
$sel = " selected=\"selected\"";
}


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}


eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";");
}

Zeile 3093Zeile 3091
						{
$checked = " checked=\"checked\"";
}

						{
$checked = " checked=\"checked\"";
}





						eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
}

						eval("\$code .= \"".$templates->get("usercp_profile_profilefields_checkbox")."\";");
}

				}

				}

			}
elseif($type == "textarea")

			}
elseif($type == "textarea")

			{

			{

				$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");

				$value = htmlspecialchars_uni($userfield);
eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");

			}

			}

			else
{
$value = htmlspecialchars_uni($userfield);

			else
{
$value = htmlspecialchars_uni($userfield);

Zeile 3111Zeile 3109
				{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}

				{
$maxlength = " maxlength=\"{$profilefield['maxlength']}\"";
}





				eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
}

if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

				eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
}

if($profilefield['required'] == 1)
{
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";");

			}
else

			}
else

			{
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");
}

			{
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";");
}

Zeile 3289Zeile 3287
	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_icq = $mybb->input['icq'];
$user_skype = $mybb->input['skype'];
$user_google = $mybb->input['google'];

	$user_yahoo = $mybb->input['yahoo'];

 

$plugins->run_hooks("modcp_editprofile_end");



$plugins->run_hooks("modcp_editprofile_end");


Zeile 3548Zeile 3545
	{
$order = "desc";
$ordersel['desc'] = ' selected="selected"';

	{
$order = "desc";
$ordersel['desc'] = ' selected="selected"';

	}

	}

	else
{
$ordersel['asc'] = ' selected="selected"';

	else
{
$ordersel['asc'] = ' selected="selected"';

	}

	}


$plugins->run_hooks("modcp_warninglogs_start");



$plugins->run_hooks("modcp_warninglogs_start");


Zeile 3574Zeile 3571
	}
$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)

	}
$per_page = 20;
if(isset($mybb->input['filter']['per_page']) && (int)$mybb->input['filter']['per_page'] > 0)

	{

	{

		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

		$per_page = (int)$mybb->input['filter']['per_page'];
}
$start = ($page-1) * $per_page;

Zeile 3628Zeile 3625
		$issued_date = my_date('normal', $row['dateline']);
$revoked_text = '';
if($row['daterevoked'] > 0)

		$issued_date = my_date('normal', $row['dateline']);
$revoked_text = '';
if($row['daterevoked'] > 0)

		{

		{

			$revoked_date = my_date('relative', $row['daterevoked']);
eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";");
}

			$revoked_date = my_date('relative', $row['daterevoked']);
eval("\$revoked_text = \"".$templates->get("modcp_warninglogs_warning_revoked")."\";");
}

Zeile 3708Zeile 3705
			}

$plugins->run_hooks("modcp_ipsearch_posts_start");

			}

$plugins->run_hooks("modcp_ipsearch_posts_start");





			if($post_ip_sql)
{
$where_sql = '';

$unviewable_forums = get_unviewable_forums(true);

			if($post_ip_sql)
{
$where_sql = '';

$unviewable_forums = get_unviewable_forums(true);





				if($unviewable_forums)
{
$where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";

				if($unviewable_forums)
{
$where_sql .= " AND p.fid NOT IN ({$unviewable_forums})";

Zeile 3723Zeile 3720
				if($inactiveforums)
{
$where_sql .= " AND p.fid NOT IN ({$inactiveforums})";

				if($inactiveforums)
{
$where_sql .= " AND p.fid NOT IN ({$inactiveforums})";

				}

				}


// Check group permissions if we can't view threads not started by us
$onlyusfids = array();


// Check group permissions if we can't view threads not started by us
$onlyusfids = array();

Zeile 3733Zeile 3730
					if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;

					if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
$onlyusfids[] = $fid;

					}
}


					}
}


				if(!empty($onlyusfids))
{
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";

				if(!empty($onlyusfids))
{
$where_sql .= " AND ((t.fid IN(".implode(',', $onlyusfids).") AND t.uid='{$mybb->user['uid']}') OR t.fid NOT IN(".implode(',', $onlyusfids)."))";

Zeile 3762Zeile 3759
					}

if(!empty($unapprove_forums))

					}

if(!empty($unapprove_forums))

					{

					{

						$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";
}
if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";
}

						$visible_sql .= " OR (p.visible = 0 AND p.fid IN(".implode(',', $unapprove_forums).")) OR (t.visible = 0 AND t.fid IN(".implode(',', $unapprove_forums)."))";
}
if(!empty($deleted_forums))
{
$visible_sql .= " OR (p.visible = -1 AND p.fid IN(".implode(',', $deleted_forums).")) OR (t.visible = -1 AND t.fid IN(".implode(',', $deleted_forums)."))";
}

				}

				}

				else
{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";
}

				else
{
// Super moderators (and admins)
$visible_sql = " AND p.visible >= -1";
}





				$query = $db->query("
SELECT COUNT(p.pid) AS count
FROM ".TABLE_PREFIX."posts p

				$query = $db->query("
SELECT COUNT(p.pid) AS count
FROM ".TABLE_PREFIX."posts p

Zeile 3788Zeile 3785

// Searching user IP addresses
if(isset($mybb->input['search_users']))


// Searching user IP addresses
if(isset($mybb->input['search_users']))

		{

		{

			if($ip_range)
{
if(!is_array($ip_range))

			if($ip_range)
{
if(!is_array($ip_range))

Zeile 3840Zeile 3837
		}

if($page > $pages || $page <= 0)

		}

if($page > $pages || $page <= 0)

		{
$page = 1;
}

		{
$page = 1;
}


if($page)
{


if($page)
{

Zeile 3895Zeile 3892
				{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));

				{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_regip")."\";");
$ip = my_inet_ntop($db->unescape_binary($ipaddress['regip']));

				}

				}

				elseif($ipaddress['lastip'] == $ip_range)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");

				elseif($ipaddress['lastip'] == $ip_range)
{
eval("\$subject = \"".$templates->get("modcp_ipsearch_result_lastip")."\";");

Zeile 3976Zeile 3973

eval("\$subject = \"".$templates->get("modcp_ipsearch_result_post")."\";");
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");


eval("\$subject = \"".$templates->get("modcp_ipsearch_result_post")."\";");
eval("\$results .= \"".$templates->get("modcp_ipsearch_result")."\";");

				}

				}

			}
}


			}
}


Zeile 4245Zeile 4242

$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();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


	$cache->update_moderators();
log_moderator_action(array("uid" => $ban['uid'], "username" => $username), $lang->lifted_ban);


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

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

				'oldadditionalgroups' => (string)$user['additionalgroups'],

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

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

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

Zeile 4407Zeile 4403
			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");

			'additionalgroups' => '',
);
$db->update_query('users', $update_array, "uid = {$user['uid']}");


$cache->update_banned();

 

// Log edit or add ban
if($existing_ban)


// Log edit or add ban
if($existing_ban)