Vergleich reputation.php - 1.2.6 - 1.2.13

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 3Zeile 3
 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * MyBB 1.2
* Copyright � 2006 MyBB Group, All Rights Reserved
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/eula.html

 *

 *

 * $Id: reputation.php 2630 2007-01-11 10:51:24Z chris $

 * $Id: reputation.php 3598 2008-01-20 20:42:43Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 98Zeile 98
// Saving the new reputation
if($mybb->input['action'] == "do_add" && $mybb->request_method == "post")
{

// Saving the new reputation
if($mybb->input['action'] == "do_add" && $mybb->request_method == "post")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	$plugins->run_hooks("reputation_do_add_start");

// Check if the reputation power they're trying to give is within their "power limit"
$reputation = $mybb->input['reputation'];
$reputation = intval(str_replace("-", "", $reputation));
if($mybb->input['reputation'] == "neutral")

	$plugins->run_hooks("reputation_do_add_start");

// Check if the reputation power they're trying to give is within their "power limit"
$reputation = $mybb->input['reputation'];
$reputation = intval(str_replace("-", "", $reputation));
if($mybb->input['reputation'] == "neutral")

	{

	{

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


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


Zeile 113Zeile 116
	{
$db->delete_query(TABLE_PREFIX."reputation", "uid='".intval($mybb->input['uid'])."' AND adduid='".$mybb->user['uid']."'");


	{
$db->delete_query(TABLE_PREFIX."reputation", "uid='".intval($mybb->input['uid'])."' AND adduid='".$mybb->user['uid']."'");


		// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select(TABLE_PREFIX."reputation", "SUM(reputation) AS reputation_count", "uid='".intval($mybb->input['uid'])."'");
$reputation_value = $db->fetch_field($query, "reputation_count");


		// Recount the reputation of this user - keep it in sync.
$query = $db->simple_select(TABLE_PREFIX."reputation", "SUM(reputation) AS reputation_count", "uid='".intval($mybb->input['uid'])."'");
$reputation_value = $db->fetch_field($query, "reputation_count");


		$db->update_query(TABLE_PREFIX."users", array('reputation' => intval($reputation_value)), "uid='".intval($mybb->input['uid'])."'");
eval("\$error = \"".$templates->get("reputation_deleted")."\";");
output_page($error);

		$db->update_query(TABLE_PREFIX."users", array('reputation' => intval($reputation_value)), "uid='".intval($mybb->input['uid'])."'");
eval("\$error = \"".$templates->get("reputation_deleted")."\";");
output_page($error);

Zeile 166Zeile 169

$lang->vote_added = $lang->vote_updated;
$lang->vote_added_message = $lang->vote_updated_message;


$lang->vote_added = $lang->vote_updated;
$lang->vote_added_message = $lang->vote_updated_message;

	}

	}

	// Insert a new reputation
else
{

	// Insert a new reputation
else
{

Zeile 235Zeile 238
// Delete a specific reputation from a user.
if($mybb->input['action'] == "delete")
{

// Delete a specific reputation from a user.
if($mybb->input['action'] == "delete")
{

 
	// Verify incoming POST request
verify_post_check($mybb->input['my_post_key']);


	// Fetch the existing reputation for this user given by our current user if there is one.
$query = $db->simple_select(TABLE_PREFIX."reputation", "*", "rid='".intval($mybb->input['rid'])."'");
$existing_reputation = $db->fetch_array($query);

	// Fetch the existing reputation for this user given by our current user if there is one.
$query = $db->simple_select(TABLE_PREFIX."reputation", "*", "rid='".intval($mybb->input['rid'])."'");
$existing_reputation = $db->fetch_array($query);

Zeile 504Zeile 510
		// Does the current user have permission to delete this reputation? Show delete link
if($mybb->usergroup['cancp'] == "yes" || ($mybb->usergroup['cangivereputations'] == "yes" && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
{

		// Does the current user have permission to delete this reputation? Show delete link
if($mybb->usergroup['cancp'] == "yes" || ($mybb->usergroup['cangivereputations'] == "yes" && $reputation_vote['adduid'] == $mybb->user['uid'] && $mybb->user['uid'] != 0))
{

			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";

			$delete_link = "[<a href=\"reputation.php?action=delete&amp;uid={$reputation_vote['rated_uid']}&amp;rid={$reputation_vote['rid']}&amp;my_post_key={$mybb->post_code}\" onclick=\"MyBB.deleteReputation({$reputation_vote['rated_uid']}, {$reputation_vote['rid']}); return false;\">{$lang->delete_vote}</a>]";

		}
else
{

		}
else
{