Vergleich reputation.php - 1.6.11 - 1.6.17

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 291Zeile 291
		output_page($error);
exit;
}

		output_page($error);
exit;
}


$mybb->input['comments'] = utf8_handle_4byte_string($mybb->input['comments']);

 

// Build array of reputation data.
$reputation = array(


// Build array of reputation data.
$reputation = array(

Zeile 312Zeile 310
		if($existing_reputation['uid'])
{
$db->update_query("reputation", $reputation, "rid='".$existing_reputation['rid']."'");

		if($existing_reputation['uid'])
{
$db->update_query("reputation", $reputation, "rid='".$existing_reputation['rid']."'");

		}
elseif($existing_post_reputation['uid'])
{
$db->update_query("reputation", $reputation, "rid='".$existing_post_reputation['rid']."'");
}

// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation_count", "uid='{$uid}'");

		}
elseif($existing_post_reputation['uid'])
{
$db->update_query("reputation", $reputation, "rid='".$existing_post_reputation['rid']."'");
}

// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation_count", "uid='{$uid}'");

		$reputation_value = $db->fetch_field($query, "reputation_count");

$db->update_query("users", array('reputation' => intval($reputation_value)), "uid='{$uid}'");

		$reputation_value = $db->fetch_field($query, "reputation_count");

$db->update_query("users", array('reputation' => intval($reputation_value)), "uid='{$uid}'");

Zeile 396Zeile 394
		if($existing_reputation['uid'])
{
$vote_check[$existing_reputation['reputation']] = " selected=\"selected\"";

		if($existing_reputation['uid'])
{
$vote_check[$existing_reputation['reputation']] = " selected=\"selected\"";

		}

		}


if($mybb->settings['neurep'])
{


if($mybb->settings['neurep'])
{

Zeile 447Zeile 445
		WHERE rid = '".intval($mybb->input['rid'])."'
");
$existing_reputation = $db->fetch_array($query);

		WHERE rid = '".intval($mybb->input['rid'])."'
");
$existing_reputation = $db->fetch_array($query);





	// Only administrators, super moderators, as well as users who gave a specifc vote can delete one.
if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $existing_reputation['adduid'] != $mybb->user['uid'])

	// Only administrators, super moderators, as well as users who gave a specifc vote can delete one.
if($mybb->usergroup['cancp'] != 1 && $mybb->usergroup['issupermod'] != 1 && $existing_reputation['adduid'] != $mybb->user['uid'])

	{

	{

		error_no_permission();
}

		error_no_permission();
}





	// Delete the specified reputation
$db->delete_query("reputation", "uid='{$uid}' AND rid='".intval($mybb->input['rid'])."'");

	// Delete the specified reputation
$db->delete_query("reputation", "uid='{$uid}' AND rid='".intval($mybb->input['rid'])."'");





	// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation_count", "uid='{$uid}'");
$reputation_value = $db->fetch_field($query, "reputation_count");

// Create moderator log
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->sprintf($lang->delete_reputation_log, $existing_reputation['username'], $existing_reputation['adduid']));

	// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select("reputation", "SUM(reputation) AS reputation_count", "uid='{$uid}'");
$reputation_value = $db->fetch_field($query, "reputation_count");

// Create moderator log
log_moderator_action(array("uid" => $user['uid'], "username" => $user['username']), $lang->sprintf($lang->delete_reputation_log, $existing_reputation['username'], $existing_reputation['adduid']));





	$db->update_query("users", array('reputation' => intval($reputation_value)), "uid='{$uid}'");

redirect("reputation.php?uid={$uid}", $lang->vote_deleted_message);

	$db->update_query("users", array('reputation' => intval($reputation_value)), "uid='{$uid}'");

redirect("reputation.php?uid={$uid}", $lang->vote_deleted_message);

Zeile 473Zeile 471
if(!$mybb->input['action'])
{
if($mybb->usergroup['canviewprofiles'] == 0)

if(!$mybb->input['action'])
{
if($mybb->usergroup['canviewprofiles'] == 0)

	{

	{

		// Reputation page is a part of a profile
error_no_permission();

		// Reputation page is a part of a profile
error_no_permission();

	}








	}

// Set display group to their user group if they don't have a display group.
if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}


	// Fetch display group properties.
$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image', 'usereputationsystem');
$display_group = usergroup_displaygroup($user['displaygroup']);

if($user_permissions['usereputationsystem'] != 1 || $display_group['title'] && $display_group['usereputationsystem'] == 0)

	// Fetch display group properties.
$displaygroupfields = array('title', 'description', 'namestyle', 'usertitle', 'stars', 'starimage', 'image', 'usereputationsystem');
$display_group = usergroup_displaygroup($user['displaygroup']);

if($user_permissions['usereputationsystem'] != 1 || $display_group['title'] && $display_group['usereputationsystem'] == 0)

	{

	{

		// Group has reputation disabled or user has a display group that has reputation disabled
error($lang->reputations_disabled_group);

		// Group has reputation disabled or user has a display group that has reputation disabled
error($lang->reputations_disabled_group);

	}

	}


$lang->nav_profile = $lang->sprintf($lang->nav_profile, $user['username']);
$lang->reputation_report = $lang->sprintf($lang->reputation_report, $user['username']);

// Format the user name using the group username style
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);


$lang->nav_profile = $lang->sprintf($lang->nav_profile, $user['username']);
$lang->reputation_report = $lang->sprintf($lang->reputation_report, $user['username']);

// Format the user name using the group username style
$username = format_name($user['username'], $user['usergroup'], $user['displaygroup']);


// Set display group to their user group if they don't have a display group.
if(!$user['displaygroup'])
{
$user['displaygroup'] = $user['usergroup'];
}

 

// This user has a custom user title
if(trim($user['usertitle']) != '')


// This user has a custom user title
if(trim($user['usertitle']) != '')