Vergleich reputation.php - 1.4.11 - 1.4.15

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: reputation.php 4304 2009-01-02 01:11:56Z chris $

 * $Id: reputation.php 5379 2011-02-21 11:06:42Z Tomm $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 352Zeile 352
	// Fetch the total number of reputations for this user
$query = $db->simple_select("reputation r", "COUNT(r.rid) AS reputation_count", "r.uid='{$user['uid']}' $conditions");
$reputation_count = $db->fetch_field($query, "reputation_count");

	// Fetch the total number of reputations for this user
$query = $db->simple_select("reputation r", "COUNT(r.rid) AS reputation_count", "r.uid='{$user['uid']}' $conditions");
$reputation_count = $db->fetch_field($query, "reputation_count");

 

// If the user has no reputation, suspect 0...
if(!$user['reptuation'])
{
$user['reputation'] = 0;
}

// Quickly check to see if we're in sync...
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation", "uid = '".$user['uid']."'");
$sync_reputation = $db->fetch_field($query, "reputation");

if($sync_reputation != $user['reputation'])
{
// We're out of sync! Oh noes!
$db->update_query("users", array("reputation" => $sync_reputation), "uid = '".$user['uid']."'");
$user['reputation'] = $sync_reputation;
}


// Set default count variables to 0
$positive_count = $negative_count = $neutral_count = 0;


// Set default count variables to 0
$positive_count = $negative_count = $neutral_count = 0;

Zeile 370Zeile 387
	{
// This is a positive reputation
if($reputation_vote['reputation'] > 0)

	{
// This is a positive reputation
if($reputation_vote['reputation'] > 0)

		{

		{

			$positive_count++;
if($reputation_vote['dateline'] >= $last_week)
{

			$positive_count++;
if($reputation_vote['dateline'] >= $last_week)
{

Zeile 442Zeile 459

// Build out multipage navigation
if($reputation_count > 0)


// Build out multipage navigation
if($reputation_count > 0)

	{

	{

		$multipage = multipage($reputation_count, $mybb->settings['repsperpage'], $page, "reputation.php?uid={$user['uid']}");
}


		$multipage = multipage($reputation_count, $mybb->settings['repsperpage'], $page, "reputation.php?uid={$user['uid']}");
}


Zeile 457Zeile 474
	");
while($reputation_vote = $db->fetch_array($query))
{

	");
while($reputation_vote = $db->fetch_array($query))
{

 
		// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{
$reputation_vote['user_reputation'] = 0;
}

$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);


		// Format the username of this poster

		// Format the username of this poster

		$reputation_vote['username'] = format_name($reputation_vote['username'], $reputation_vote['user_usergroup'], $reputation_vote['user_displaygroup']);
$reputation_vote['username'] = build_profile_link($reputation_vote['username'], $reputation_vote['uid']);











		if(!$reputation_vote['username'])
{
$reputation_vote['username'] = $lang->na;
$reputation_vote['user_reputation'] = '';
}
else
{
$reputation_vote['username'] = format_name($reputation_vote['username'], $reputation_vote['user_usergroup'], $reputation_vote['user_displaygroup']);
$reputation_vote['username'] = build_profile_link($reputation_vote['username'], $reputation_vote['uid']);
$reputation_vote['user_reputation'] = "({$reputation_vote['user_reputation']})";
}


		$vote_reputation = intval($reputation_vote['reputation']);

// This is a negative reputation

		$vote_reputation = intval($reputation_vote['reputation']);

// This is a negative reputation

Zeile 485Zeile 519
			$vote_type_class = "reputation_positive";
$vote_type = $lang->positive;
}

			$vote_type_class = "reputation_positive";
$vote_type = $lang->positive;
}

		



		$vote_reputation = "({$vote_reputation})";

		$vote_reputation = "({$vote_reputation})";


// Get the reputation for the user who posted this comment
if($reputation_vote['adduid'] == 0)
{
$reputation_vote['user_reputation'] = 0;
}
$reputation_vote['user_reputation'] = get_reputation($reputation_vote['user_reputation'], $reputation_vote['adduid']);
if($reputation_vote['username'])
{
$reputation_vote['user_reputation'] = " <span class=\"smalltext\">({$reputation_vote['user_reputation']})";
}
else
{
$reputation_vote['user_reputation'] = '';
}


 

// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);


// Format the date this reputation was last modified
$last_updated_date = my_date($mybb->settings['dateformat'], $reputation_vote['dateline']);