Vergleich usercp.php - 1.6.2 - 1.6.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: usercp.php 5142 2010-07-29 23:36:56Z RyanGordon $

 * $Id: usercp.php 5459 2011-05-10 10:47:56Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 403Zeile 403
	while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

	while($profilefield = $db->fetch_array($query))
{
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']);

 
		$profilefield['name'] = htmlspecialchars_uni($profilefield['name']);

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

		$profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
$thing = explode("\n", $profilefield['type'], "2");
$type = $thing[0];

Zeile 576Zeile 577
		{
$defaulttitle = $mybb->usergroup['usertitle'];
}

		{
$defaulttitle = $mybb->usergroup['usertitle'];
}

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



if(trim($user['usertitle']) == '')

		{
$lang->current_custom_usertitle = '';
}

		{
$lang->current_custom_usertitle = '';
}

Zeile 649Zeile 651
	if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = intval($mybb->input['ppp']);

	if($mybb->settings['userpppoptions'])
{
$user['options']['ppp'] = intval($mybb->input['ppp']);

	}


	}


	$userhandler->set_data($user);

	$userhandler->set_data($user);







	if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

	if(!$userhandler->validate_user())
{
$errors = $userhandler->get_friendly_errors();

Zeile 675Zeile 677
	$plugins->run_hooks("usercp_options_start");

if($errors != '')

	$plugins->run_hooks("usercp_options_start");

if($errors != '')

	{

	{

		$user = $mybb->input;
}
else

		$user = $mybb->input;
}
else

Zeile 685Zeile 687
	$languages = $lang->get_languages();
$langoptions = '';
foreach($languages as $lname => $language)

	$languages = $lang->get_languages();
$langoptions = '';
foreach($languages as $lname => $language)

	{

	{

		$sel = "";
if($user['language'] == $lname)
{

		$sel = "";
if($user['language'] == $lname)
{

Zeile 757Zeile 759
	if($user['showquickreply'] == 1)
{
$showquickreplycheck = "checked=\"checked\"";

	if($user['showquickreply'] == 1)
{
$showquickreplycheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$showquickreplycheck = "";
}

if($user['receivepms'] == 1)

		$showquickreplycheck = "";
}

if($user['receivepms'] == 1)

	{

	{

		$receivepmscheck = "checked=\"checked\"";

		$receivepmscheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$receivepmscheck = "";
}

if($user['receivefrombuddy'] == 1)

		$receivepmscheck = "";
}

if($user['receivefrombuddy'] == 1)

	{

	{

		$receivefrombuddycheck = "checked=\"checked\"";

		$receivefrombuddycheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$receivefrombuddycheck = "";
}

if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)

		$receivefrombuddycheck = "";
}

if($user['pmnotice'] == 1 || $user['pmnotice'] == 2)

	{

	{

		$pmnoticecheck = " checked=\"checked\"";
}
else

		$pmnoticecheck = " checked=\"checked\"";
}
else

	{

	{

		$pmnoticecheck = "";
}


		$pmnoticecheck = "";
}


Zeile 795Zeile 797
		$dst_auto_selected = "selected=\"selected\"";
}
else if($user['dstcorrection'] == 1)

		$dst_auto_selected = "selected=\"selected\"";
}
else if($user['dstcorrection'] == 1)

	{

	{

		$dst_enabled_selected = "selected=\"selected\"";

		$dst_enabled_selected = "selected=\"selected\"";

	}
else
{

	}
else
{

		$dst_disabled_selected = "selected=\"selected\"";
}

if($user['showcodebuttons'] == 1)

		$dst_disabled_selected = "selected=\"selected\"";
}

if($user['showcodebuttons'] == 1)

	{

	{

		$showcodebuttonscheck = "checked=\"checked\"";

		$showcodebuttonscheck = "checked=\"checked\"";

	}
else
{

	}
else
{

		$showcodebuttonscheck = "";
}

if($user['showredirect'] != 0)

		$showcodebuttonscheck = "";
}

if($user['showredirect'] != 0)

	{

	{

		$showredirectcheck = "checked=\"checked\"";
}
else

		$showredirectcheck = "checked=\"checked\"";
}
else

Zeile 822Zeile 824
	}

if($user['pmnotify'] != 0)

	}

if($user['pmnotify'] != 0)

	{

	{

		$pmnotifycheck = "checked=\"checked\"";
}
else

		$pmnotifycheck = "checked=\"checked\"";
}
else

Zeile 832Zeile 834


if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")



if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear")

	{

	{

		$user['threadmode'] = ''; // Leave blank to show default
}

if($user['classicpostbit'] != 0)

		$user['threadmode'] = ''; // Leave blank to show default
}

if($user['classicpostbit'] != 0)

	{

	{

		$classicpostbitcheck = "checked=\"checked\"";
}
else

		$classicpostbitcheck = "checked=\"checked\"";
}
else

	{

	{

		$classicpostbitcheck = '';
}


		$classicpostbitcheck = '';
}


Zeile 850Zeile 852
	foreach($date_formats as $key => $format)
{
if($user['dateformat'] == $key)

	foreach($date_formats as $key => $format)
{
if($user['dateformat'] == $key)

		{

		{

			$date_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
}
else

			$date_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
}
else

Zeile 869Zeile 871
		else
{
$time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		else
{
$time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";

		}
}

		}
}


$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);



$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);


Zeile 935Zeile 937
	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

	$errors = array();

$plugins->run_hooks("usercp_do_email_start");

	if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)
{
$errors[] = $lang->error_invalidpassword;
}
else
{
// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");


	if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)
{
$errors[] = $lang->error_invalidpassword;
}
else
{
// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");


		$user = array(
"uid" => $mybb->user['uid'],
"email" => $mybb->input['email'],

		$user = array(
"uid" => $mybb->user['uid'],
"email" => $mybb->input['email'],

Zeile 1053Zeile 1055
			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);
$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);

			my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']);
$plugins->run_hooks("usercp_do_password_end");
redirect("usercp.php", $lang->redirect_passwordupdated);

		}
}

		}
}

	if(count($errors) > 0)
{
$mybb->input['action'] = "password";
$errors = inline_error($errors);

	if(count($errors) > 0)
{
$mybb->input['action'] = "password";
$errors = inline_error($errors);

	}

	}

}

if($mybb->input['action'] == "password")

}

if($mybb->input['action'] == "password")

{

{

	$plugins->run_hooks("usercp_password");

eval("\$editpassword = \"".$templates->get("usercp_password")."\";");

	$plugins->run_hooks("usercp_password");

eval("\$editpassword = \"".$templates->get("usercp_password")."\";");

Zeile 1077Zeile 1079

$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)


$plugins->run_hooks("usercp_do_changename_start");
if($mybb->usergroup['canchangename'] != 1)

	{

	{

		error_no_permission();
}


		error_no_permission();
}


Zeile 1090Zeile 1092
		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");

		// Set up user handler.
require_once "inc/datahandlers/user.php";
$userhandler = new UserDataHandler("update");





		$user = array(
"uid" => $mybb->user['uid'],
"username" => $mybb->input['username']

		$user = array(
"uid" => $mybb->user['uid'],
"username" => $mybb->input['username']

Zeile 1162Zeile 1164
		else if($mybb->input['do'] == "instant_notification")
{
$new_notification = 1;

		else if($mybb->input['do'] == "instant_notification")
{
$new_notification = 1;

		}


		}


		// Update
$update_array = array("notification" => $new_notification);
$db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

		// Update
$update_array = array("notification" => $new_notification);
$db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");

Zeile 1235Zeile 1237
		$forumpermissions = $fpermissions[$subscription['fid']];

if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		$forumpermissions = $fpermissions[$subscription['fid']];

if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

		{

		{

			// Hmm, you don't have permission to view this thread - unsubscribe!
$del_subscriptions[] = $subscription['tid'];
}
else if($subscription['tid'])
{
$subscriptions[$subscription['tid']] = $subscription;

			// Hmm, you don't have permission to view this thread - unsubscribe!
$del_subscriptions[] = $subscription['tid'];
}
else if($subscription['tid'])
{
$subscriptions[$subscription['tid']] = $subscription;

		}
}

		}
}


if(is_array($del_subscriptions))
{


if(is_array($del_subscriptions))
{

Zeile 1271Zeile 1273
			$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else

			$forumsread = unserialize($mybb->cookies['mybb']['forumread']);
}
else

		{

		{

			// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

			// Build a forum cache.
$query = $db->query("
SELECT f.fid, fr.dateline AS lastread

Zeile 1280Zeile 1282
				WHERE f.active != 0
ORDER BY pid, disporder
");

				WHERE f.active != 0
ORDER BY pid, disporder
");

		}

		}

		while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

		while($forum = $db->fetch_array($query))
{
if($mybb->user['uid'] == 0)

			{

			{

				if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];
}

				if($forumsread[$forum['fid']])
{
$forum['lastread'] = $forumsread[$forum['fid']];
}

			}

			}

			$readforums[$forum['fid']] = $forum['lastread'];
}


			$readforums[$forum['fid']] = $forum['lastread'];
}


Zeile 1298Zeile 1300
		{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($post = $db->fetch_array($query))

		{
$query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($post = $db->fetch_array($query))

			{

			{

				$subscriptions[$post['tid']]['doticon'] = 1;
}
}

				$subscriptions[$post['tid']]['doticon'] = 1;
}
}

Zeile 1308Zeile 1310
		{
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($readthread = $db->fetch_array($query))

		{
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})");
while($readthread = $db->fetch_array($query))

			{

			{

				$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}

				$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline'];
}
}

Zeile 1381Zeile 1383
			if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;

			if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
{
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;

			}

			}


if($thread['lastpost'] > $cutoff)
{


if($thread['lastpost'] > $cutoff)
{

Zeile 1455Zeile 1457
			if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

			if($lastposteruid == 0)
{
$lastposterlink = $lastposter;

			}
else
{

			}
else
{

				$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}


				$lastposterlink = build_profile_link($lastposter, $lastposteruid);
}


Zeile 2043Zeile 2045
		if($mybb->user['ignorelist'])
{
$existing_users = explode(",", $mybb->user['ignorelist']);

		if($mybb->user['ignorelist'])
{
$existing_users = explode(",", $mybb->user['ignorelist']);

		}

		}


if($mybb->user['buddylist'])
{


if($mybb->user['buddylist'])
{

Zeile 2924Zeile 2926
{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);

{
// Get posts per day
$daysreg = (TIME_NOW - $mybb->user['regdate']) / (24*3600);

 

if($daysreg < 1)
{
$daysreg = 1;
}


	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])

	$perday = $mybb->user['postnum'] / $daysreg;
$perday = round($perday, 2);
if($perday > $mybb->user['postnum'])