Vergleich inc/datahandlers/pm.php - 1.2.5 - 1.2.9

  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: pm.php 2279 2006-09-27 10:35:25Z chris $

 * $Id: pm.php 3161 2007-06-26 07:00:00Z Tikitiki $

 */

 */

 

// Disallow direct access to this file for security reasons
if(!defined("IN_MYBB"))
{
die("Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.");
}


/*
EXAMPLE USE:


/*
EXAMPLE USE:





*/

/**

*/

/**

Zeile 26Zeile 32
	* @var string
*/
var $language_file = 'datahandler_pm';

	* @var string
*/
var $language_file = 'datahandler_pm';


/**


/**

	* The prefix for the language variables used in the data handler.
*
* @var string

	* The prefix for the language variables used in the data handler.
*
* @var string

Zeile 64Zeile 70

// Subject is over 85 characters, too long.
if(my_strlen($subject) > 85)


// Subject is over 85 characters, too long.
if(my_strlen($subject) > 85)

		{

		{

			$this->set_error("too_long_subject");
return false;
}

			$this->set_error("too_long_subject");
return false;
}

Zeile 100Zeile 106
	 * @return boolean True when valid, false when invalid.
*/
function verify_sender()

	 * @return boolean True when valid, false when invalid.
*/
function verify_sender()

	{
global $db, $mybb, $lang;


	{
global $db, $mybb, $lang;


		$pm = &$this->data;

// Fetch the senders profile data.

		$pm = &$this->data;

// Fetch the senders profile data.

Zeile 139Zeile 145
		global $db, $mybb, $lang;

$pm = &$this->data;

		global $db, $mybb, $lang;

$pm = &$this->data;





		// No user ID is specified, we need to query for it based on the username.
if(!isset($pm['toid']))

		// No user ID is specified, we need to query for it based on the username.
if(!isset($pm['toid']))

		{

		{

			$query = $db->simple_select(TABLE_PREFIX."users", "uid", "username='".$db->escape_string($pm['username'])."'", array("limit" => 1));
$user = $db->fetch_array($query);
$pm['toid'] = $user['uid'];

			$query = $db->simple_select(TABLE_PREFIX."users", "uid", "username='".$db->escape_string($pm['username'])."'", array("limit" => 1));
$user = $db->fetch_array($query);
$pm['toid'] = $user['uid'];

		}

		}


// Cache the to user information.
$touser = get_user($pm['toid']);


// Cache the to user information.
$touser = get_user($pm['toid']);

Zeile 157Zeile 163
			$this->set_error("invalid_recipient");
return false;
}

			$this->set_error("invalid_recipient");
return false;
}



		

		// Collect group permissions for the sender and recipient.
$recipient_permissions = user_permissions($touser['uid']);
$sender_permissions = user_permissions($pm['fromid']);

		// Collect group permissions for the sender and recipient.
$recipient_permissions = user_permissions($touser['uid']);
$sender_permissions = user_permissions($pm['fromid']);

Zeile 187Zeile 193
		}

// Check to see if the user has reached their private message quota - if they have, email them.

		}

// Check to see if the user has reached their private message quota - if they have, email them.

		if($recipient_permissions['pmquota'] != "0" && $touser['pms_total'] >= $recipient_permissions['pmquota'] && $recipient_permissions['cancp'] != "yes" && $sender_permissions['cancp'] != "yes" && !$pm['saveasdraft'] && !$this->admin_override)

		if($recipient_permissions['pmquota'] != "0" && $touser['totalpms'] >= $recipient_permissions['pmquota'] && $recipient_permissions['cancp'] != "yes" && $sender_permissions['cancp'] != "yes" && !$pm['saveasdraft'] && !$this->admin_override)

		{
if(trim($touser['language']) != '' && $lang->language_exists($touser['language']))
{

		{
if(trim($touser['language']) != '' && $lang->language_exists($touser['language']))
{