Vergleich inc/datahandlers/warnings.php - 1.8.1 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 83Zeile 83
		if($user['warningpoints'] >= $mybb->settings['maxwarningpoints'])
{
$this->set_error('error_user_reached_max_warning');

		if($user['warningpoints'] >= $mybb->settings['maxwarningpoints'])
{
$this->set_error('error_user_reached_max_warning');

			return false;
}

return true;
}

/**
* Validate a warning thread.
*
* @return boolean True when valid, false when invalid.
*/
function validate_thread()
{
$warning = &$this->data;

$thread = get_thread($warning['tid']);

if(!$thread['tid'])
{
$this->set_error('error_invalid_post');

 
			return false;
}


			return false;
}


Zeile 124Zeile 104
		{
$this->set_error('error_invalid_post');
return false;

		{
$this->set_error('error_invalid_post');
return false;

		}

if(!isset($warning['tid']))
{
$warning['tid'] = $post['tid'];

 
		}

return true;

		}

return true;

Zeile 283Zeile 258
		if(array_key_exists('pid', $warning))
{
$this->validate_post();

		if(array_key_exists('pid', $warning))
{
$this->validate_post();

			$this->validate_thread();

 
		}
if(array_key_exists('type', $warning))
{

		}
if(array_key_exists('type', $warning))
{

Zeile 696Zeile 670

$this->write_warning_data = array(
"uid" => (int)$warning['uid'],


$this->write_warning_data = array(
"uid" => (int)$warning['uid'],

			"tid" => (int)$warning['tid'],

			"tid" => (int)$warning['type'],

			"pid" => (int)$warning['pid'],
"title" => $db->escape_string($warning['title']),
"points" => (int)$warning['points'],

			"pid" => (int)$warning['pid'],
"title" => $db->escape_string($warning['title']),
"points" => (int)$warning['points'],