Vergleich inc/datahandlers/pm.php - 1.8.5 - 1.8.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 50Zeile 50

/**
* PM ID currently being manipulated by the datahandlers.


/**
* PM ID currently being manipulated by the datahandlers.

 
	 *
* @var int

	 */
public $pmid = 0;


	 */
public $pmid = 0;


Zeile 291Zeile 293
			// See if the sender is on the recipients ignore list and that either
// - admin_override is set or
// - sender is an administrator

			// See if the sender is on the recipients ignore list and that either
// - admin_override is set or
// - sender is an administrator

			if(($this->admin_override != true && $sender_permissions['cancp'] != 1) && $sender_permissions['canoverridepm'] != 1)

			if($this->admin_override != true && $sender_permissions['canoverridepm'] != 1)

			{
if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false)
{

			{
if(!empty($user['ignorelist']) && strpos(','.$user['ignorelist'].',', ','.$pm['fromid'].',') !== false)
{

					$this->set_error('recipient_is_ignoring', array($user['username']));

					$this->set_error("recipient_is_ignoring", array(htmlspecialchars_uni($user['username'])));

				}

// Is the recipient only allowing private messages from their buddy list?

				}

// Is the recipient only allowing private messages from their buddy list?

Zeile 307Zeile 309
				// Can the recipient actually receive private messages based on their permissions or user setting?
if(($user['receivepms'] == 0 || $recipient_permissions['canusepms'] == 0) && empty($pm['saveasdraft']))
{

				// Can the recipient actually receive private messages based on their permissions or user setting?
if(($user['receivepms'] == 0 || $recipient_permissions['canusepms'] == 0) && empty($pm['saveasdraft']))
{

					$this->set_error("recipient_pms_disabled", array($user['username']));

					$this->set_error("recipient_pms_disabled", array(htmlspecialchars_uni($user['username'])));

					return false;
}
}

					return false;
}
}

Zeile 357Zeile 359

if($this->admin_override != true)
{


if($this->admin_override != true)
{

					$this->set_error("recipient_reached_quota", array($user['username']));

					$this->set_error("recipient_reached_quota", array(htmlspecialchars_uni($user['username'])));

				}
}


				}
}


Zeile 384Zeile 386
	/**
* Verify that the user is not flooding the system.
*

	/**
* Verify that the user is not flooding the system.
*

	* @return boolean True

	* @return boolean

	*/
function verify_pm_flooding()
{

	*/
function verify_pm_flooding()
{

Zeile 393Zeile 395
		$pm = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.

		$pm = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.

		if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] != 0 && $this->admin_override == false)

		if($mybb->settings['pmfloodsecs'] > 0 && $pm['fromid'] != 0 && $this->admin_override == false && !is_moderator(0, '', $pm['fromid']))

		{
// Fetch the senders profile data.
$sender = get_user($pm['fromid']);

		{
// Fetch the senders profile data.
$sender = get_user($pm['fromid']);

Zeile 403Zeile 405
			$sender['lastpm'] = $db->fetch_field($query, "dateline");

// A little bit of calculation magic and moderator status checking.

			$sender['lastpm'] = $db->fetch_field($query, "dateline");

// A little bit of calculation magic and moderator status checking.

			if(TIME_NOW-$sender['lastpm'] <= $mybb->settings['pmfloodsecs'] && !is_moderator("", "", $pm['fromid']))

			if(TIME_NOW-$sender['lastpm'] <= $mybb->settings['pmfloodsecs'])

			{
// Oops, user has been flooding - throw back error message.
$time_to_wait = ($mybb->settings['pmfloodsecs'] - (TIME_NOW-$sender['lastpm'])) + 1;

			{
// Oops, user has been flooding - throw back error message.
$time_to_wait = ($mybb->settings['pmfloodsecs'] - (TIME_NOW-$sender['lastpm'])) + 1;