Vergleich inc/functions_user.php - 1.6.7 - 1.6.12

  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: functions_user.php 5734 2011-12-22 16:50:54Z ralgith $

 * $Id$

 */

/**

 */

/**

Zeile 103Zeile 103
function validate_password_from_uid($uid, $password, $user = array())
{
global $db, $mybb;

function validate_password_from_uid($uid, $password, $user = array())
{
global $db, $mybb;

	if($mybb->user['uid'] == $uid)

	if(isset($mybb->user['uid']) && $mybb->user['uid'] == $uid)

	{
$user = $mybb->user;
}

	{
$user = $mybb->user;
}

Zeile 269Zeile 269
 * @return boolean True when success, false when otherwise.
*/
function add_subscribed_thread($tid, $notification=1, $uid="")

 * @return boolean True when success, false when otherwise.
*/
function add_subscribed_thread($tid, $notification=1, $uid="")

{
global $mybb, $db;

if(!$uid)
{
$uid = $mybb->user['uid'];
}

if(!$uid)
{
return;
}

{
global $mybb, $db;

if(!$uid)
{
$uid = $mybb->user['uid'];
}

if(!$uid)
{
return;
}

	
$query = $db->simple_select("threadsubscriptions", "*", "tid='".intval($tid)."' AND uid='".intval($uid)."'", array('limit' => 1));
$subscription = $db->fetch_array($query);

	
$query = $db->simple_select("threadsubscriptions", "*", "tid='".intval($tid)."' AND uid='".intval($uid)."'", array('limit' => 1));
$subscription = $db->fetch_array($query);

Zeile 292Zeile 292
			'notification' => intval($notification),
'dateline' => TIME_NOW,
'subscriptionkey' => md5(TIME_NOW.$uid.$tid)

			'notification' => intval($notification),
'dateline' => TIME_NOW,
'subscriptionkey' => md5(TIME_NOW.$uid.$tid)





		);
$db->insert_query("threadsubscriptions", $insert_array);
}

		);
$db->insert_query("threadsubscriptions", $insert_array);
}

Zeile 316Zeile 316
 * @return boolean True when success, false when otherwise.
*/
function remove_subscribed_thread($tid, $uid="")

 * @return boolean True when success, false when otherwise.
*/
function remove_subscribed_thread($tid, $uid="")

{
global $mybb, $db;

if(!$uid)
{
$uid = $mybb->user['uid'];
}

if(!$uid)
{
return;
}

{
global $mybb, $db;

if(!$uid)
{
$uid = $mybb->user['uid'];
}

if(!$uid)
{
return;
}

	$db->delete_query("threadsubscriptions", "tid='".$tid."' AND uid='{$uid}'");

return true;

	$db->delete_query("threadsubscriptions", "tid='".$tid."' AND uid='{$uid}'");

return true;

Zeile 348Zeile 348
	if(!$uid)
{
$uid = $mybb->user['uid'];

	if(!$uid)
{
$uid = $mybb->user['uid'];

	}

	}

	
if(!$uid)
{

	
if(!$uid)
{

Zeile 383Zeile 383
function remove_subscribed_forum($fid, $uid="")
{
global $mybb, $db;

function remove_subscribed_forum($fid, $uid="")
{
global $mybb, $db;

	
if(!$uid)

	
if(!$uid)

	{
$uid = $mybb->user['uid'];
}

if(!$uid)

	{
$uid = $mybb->user['uid'];
}

if(!$uid)

	{

	{

		return;
}
$db->delete_query("forumsubscriptions", "fid='".$fid."' AND uid='{$uid}'");

return true;

		return;
}
$db->delete_query("forumsubscriptions", "fid='".$fid."' AND uid='{$uid}'");

return true;

}

}


/**
* Constructs the usercp navigation menu.


/**
* Constructs the usercp navigation menu.

Zeile 420Zeile 420
	// Run the plugin hooks
$plugins->run_hooks("usercp_menu");
global $usercpmenu;

	// Run the plugin hooks
$plugins->run_hooks("usercp_menu");
global $usercpmenu;





	eval("\$usercpnav = \"".$templates->get("usercp_nav")."\";");

$plugins->run_hooks("usercp_menu_built");

	eval("\$usercpnav = \"".$templates->get("usercp_nav")."\";");

$plugins->run_hooks("usercp_menu_built");

Zeile 434Zeile 434
{
global $db, $mybb, $templates, $theme, $usercpmenu, $lang, $collapsed, $collapsedimg;


{
global $db, $mybb, $templates, $theme, $usercpmenu, $lang, $collapsed, $collapsedimg;


 
	$usercp_nav_messenger = $templates->get("usercp_nav_messenger");
// Hide tracking link if no permission
$tracking = '';
if($mybb->usergroup['cantrackpms'])
{
$tracking = $templates->get("usercp_nav_messenger_tracking");
}
eval("\$ucp_nav_tracking = \"". $tracking ."\";");

$folderlinks = '';

	$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{

	$foldersexploded = explode("$%%$", $mybb->user['pmfolders']);
foreach($foldersexploded as $key => $folders)
{

Zeile 455Zeile 465
		$folderlinks .= "<div><a href=\"private.php?fid=$folderinfo[0]\" class=\"usercp_nav_item {$class}\">$folderinfo[1]</a></div>\n";
}


		$folderlinks .= "<div><a href=\"private.php?fid=$folderinfo[0]\" class=\"usercp_nav_item {$class}\">$folderinfo[1]</a></div>\n";
}


	eval("\$usercpmenu .= \"".$templates->get("usercp_nav_messenger")."\";");

	eval("\$usercpmenu .= \"".$usercp_nav_messenger."\";");

}

/**

}

/**

Zeile 489Zeile 499
function usercp_menu_misc()
{
global $db, $mybb, $templates, $theme, $usercpmenu, $lang, $collapsed, $collapsedimg;

function usercp_menu_misc()
{
global $db, $mybb, $templates, $theme, $usercpmenu, $lang, $collapsed, $collapsedimg;

 

$draftstart = $draftend = $draftcount = '';


$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'");
$count = $db->fetch_array($query);


$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'");
$count = $db->fetch_array($query);

Zeile 553Zeile 565
	if(intval($uid) == 0)
{
$uid = $mybb->user['uid'];

	if(intval($uid) == 0)
{
$uid = $mybb->user['uid'];

 
	}

$uid = intval($uid);
$pmcount = array();
if($uid == 0)
{
return $pmcount;

	}

// Update total number of messages.

	}

// Update total number of messages.

Zeile 571Zeile 590
		$pmcount['unreadpms'] = $unread['pms_unread'];
}


		$pmcount['unreadpms'] = $unread['pms_unread'];
}


	if(is_array($pmcount))

	if(!empty($pmcount))

	{

	{

		$db->update_query("users", $pmcount, "uid='".intval($uid)."'");

		$db->update_query("users", $pmcount, "uid='".$uid."'");

	}
return $pmcount;
}

	}
return $pmcount;
}