Vergleich usercp.php - 1.03 - 1.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 719Zeile 719
{
$plugins->run_hooks("usercp_do_options_start");


{
$plugins->run_hooks("usercp_do_options_start");


	if($mybb->input['showcodebuttons'] != 1)

	if($mybb->input['showcodebuttons'] != '1')

	{
$mybb->input['showcodebuttons'] = 0;
}

	{
$mybb->input['showcodebuttons'] = 0;
}

Zeile 854Zeile 854
	}
$plugins->run_hooks("usercp_do_options_process");
$db->update_query(TABLE_PREFIX."users", $updatedoptions, "uid='".$mybb->user['uid']."'");

	}
$plugins->run_hooks("usercp_do_options_process");
$db->update_query(TABLE_PREFIX."users", $updatedoptions, "uid='".$mybb->user['uid']."'");

 
    // If the cookie settings are different, re-set the cookie
if($mybb->input['remember'] != $mybb->user['remember'])
{
$mybb->user['remember'] = $mybb->input['remember'];
// Unset the old one
myunsetcookie("mybbuser");
// Set the new one
if($mybb->input['remember'] == "yes")
{
mysetcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey']);
}
else
{
mysetcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1);
}
}

	$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
}

	$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
}

Zeile 900Zeile 916
		error($lang->error_invalidemail);
}
if(function_exists("emailChanged"))

		error($lang->error_invalidemail);
}
if(function_exists("emailChanged"))

	{
emailChanged($mybb->user['uid'], $mybb->input['email']);
}

    {
emailChanged($mybb->user['uid'], $mybb->input['email']);
}





	if(!$mybb->user['usergroup'] == "5")

    if($mybb->user['usergroup'] != "5")

	{
$activationcode = random_str();
$now = time();

	{
$activationcode = random_str();
$now = time();

Zeile 923Zeile 939
		$uid = $mybb->user['uid'];
$lang->emailsubject_changeemail = sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']);
$lang->email_changeemail = sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->input['email'], $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);

		$uid = $mybb->user['uid'];
$lang->emailsubject_changeemail = sprintf($lang->emailsubject_changeemail, $mybb->settings['bbname']);
$lang->email_changeemail = sprintf($lang->email_changeemail, $mybb->user['username'], $mybb->settings['bbname'], $mybb->user['email'], $mybb->input['email'], $mybb->settings['bburl'], $activationcode, $mybb->user['username'], $mybb->user['uid']);

		mymail($email, $lang->emailsubject_changeemail, $lang->email_changeemail);


		$email = $mybb->input['email'];
mymail($email, $lang->emailsubject_changeemail, $lang->email_changeemail);

		$plugins->run_hooks("usercp_do_email_verify");
error($lang->redirect_changeemail_activation);
}

		$plugins->run_hooks("usercp_do_email_verify");
error($lang->redirect_changeemail_activation);
}

Zeile 1109Zeile 1126
		$upper = $threadcount;
}
$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");

		$upper = $threadcount;
}
$multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions");

	$fpermissions = forum_permissions();

	$fpermissions = forum_permissions();

	$query = $db->query("SELECT s.*, t.*, i.name AS iconname, i.path AS iconpath, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."favorites s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid = t.icon) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE s.type='s' AND s.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC LIMIT $start, $perpage");
while($subscription = $db->fetch_array($query))
{

	$query = $db->query("SELECT s.*, t.*, i.name AS iconname, i.path AS iconpath, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."favorites s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."icons i ON (i.iid = t.icon) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE s.type='s' AND s.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC LIMIT $start, $perpage");
while($subscription = $db->fetch_array($query))
{

Zeile 1121Zeile 1138
			$lastposter = $subscription['lastposter'];
$subscription['author'] = $subscription['uid'];
if(!$subscription['username'])

			$lastposter = $subscription['lastposter'];
$subscription['author'] = $subscription['uid'];
if(!$subscription['username'])

			{

			{

				$subscription['username'] = $subscription['threadusername'];

				$subscription['username'] = $subscription['threadusername'];

			}

			}

			$subscription['subject'] = htmlspecialchars_uni(dobadwords($subscription['subject']));
if($subscription['iconpath'])

			$subscription['subject'] = htmlspecialchars_uni(dobadwords($subscription['subject']));
if($subscription['iconpath'])

			{

			{

				$icon = "<img src=\"$subscription[iconpath]\" alt=\"$subscription[iconname]\">";

				$icon = "<img src=\"$subscription[iconpath]\" alt=\"$subscription[iconname]\">";

			}

			}

			else
{
$icon = "&nbsp;";
}
if($mybb->user['lastvisit'] == "0")

			else
{
$icon = "&nbsp;";
}
if($mybb->user['lastvisit'] == "0")

			{

			{

				$folder = "new";
}
if($subscription['lastpost'] > $mybb->user['lastvisit'])

				$folder = "new";
}
if($subscription['lastpost'] > $mybb->user['lastvisit'])

Zeile 1173Zeile 1190
	$plugins->run_hooks("usercp_forumsubscriptions_start");
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forumpermissions WHERE gid='".$mybb->user['usergroup']."'");
while($permissions = $db->fetch_array($query))

	$plugins->run_hooks("usercp_forumsubscriptions_start");
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."forumpermissions WHERE gid='".$mybb->user['usergroup']."'");
while($permissions = $db->fetch_array($query))

	{

	{

		$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}
$fpermissions = forum_permissions();

		$permissioncache[$permissions['gid']][$permissions['fid']] = $permissions;
}
$fpermissions = forum_permissions();

Zeile 1186Zeile 1203
			if(($forum['lastpost'] > $mybb->user['lastvisit'] || $mybbforumread[$forum['fid']] > $mybb->user['lastvisit']) && $forum['lastpost'] != 0)
{
$folder = "on";

			if(($forum['lastpost'] > $mybb->user['lastvisit'] || $mybbforumread[$forum['fid']] > $mybb->user['lastvisit']) && $forum['lastpost'] != 0)
{
$folder = "on";

			}

			}

			else
{
$folder = "off";

			else
{
$folder = "off";

Zeile 1212Zeile 1229
		$posts = mynumberformat($forum['posts']);
$threads = mynumberformat($forum['threads']);
if($mybb->settings['showdescriptions'] == "no")

		$posts = mynumberformat($forum['posts']);
$threads = mynumberformat($forum['threads']);
if($mybb->settings['showdescriptions'] == "no")

		{

		{

			$forum['description'] = "";
}
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");

			$forum['description'] = "";
}
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");

Zeile 1276Zeile 1293
		$sigimgcode = $lang->off;
}
$lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);

		$sigimgcode = $lang->off;
}
$lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);

 
	$sig = htmlspecialchars_uni($sig);

	eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
$plugins->run_hooks("usercp_endsig_end");
outputpage($editsig);

	eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
$plugins->run_hooks("usercp_endsig_end");
outputpage($editsig);

Zeile 1518Zeile 1536
		while(list($key, $buddyid) = each($buddyarray))
{
$buddysql .= "$comma'$buddyid'";

		while(list($key, $buddyid) = each($buddyarray))
{
$buddysql .= "$comma'$buddyid'";

			$comma = ",";
}

			$comma = ",";
}

		$query = $db->query("SELECT username, uid FROM ".TABLE_PREFIX."users WHERE uid IN ($buddysql)");
while($buddy = $db->fetch_array($query))
{

		$query = $db->query("SELECT username, uid FROM ".TABLE_PREFIX."users WHERE uid IN ($buddysql)");
while($buddy = $db->fetch_array($query))
{

Zeile 1722Zeile 1740
	// Joining a group
if($mybb->input['joingroup'])
{

	// Joining a group
if($mybb->input['joingroup'])
{

 
		$mybb->input['joingroup'] = intval($mybb->input['joingroup']);

		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['joingroup'])."'");
$usergroup = $db->fetch_array($query);


		$query = $db->query("SELECT * FROM ".TABLE_PREFIX."usergroups WHERE gid='".intval($mybb->input['joingroup'])."'");
$usergroup = $db->fetch_array($query);


		if($usergroup['type'] != 4 && $usergroup['type'] != 3)

		if(($usergroup['type'] != 4 && $usergroup['type'] != 3) || !$usergroup['gid'])

		{
error($lang->cannot_join_group);
}

		{
error($lang->cannot_join_group);
}