Vergleich inc/datahandlers/pm.php - 1.4.9 - 1.4.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: pm.php 4372 2009-05-15 16:13:13Z Tomm $

 * $Id: pm.php 4502 2009-11-12 17:02:09Z Tomm $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 344Zeile 344
			$sender = get_user($pm['fromid']);

// Calculate last post

			$sender = get_user($pm['fromid']);

// Calculate last post

			$query = $db->simple_select("privatemessages", "dateline", "fromid='".$db->escape_string($pm['fromid'])."'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 1));

			$query = $db->simple_select("privatemessages", "dateline", "fromid='".$db->escape_string($pm['fromid'])."' AND toid != '0'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => 1));

			$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.

Zeile 507Zeile 507
		);

// Check if we're updating a draft or not.

		);

// Check if we're updating a draft or not.

		$query = $db->simple_select("privatemessages", "pmid", "folder='3' AND uid='".intval($pm['sender']['uid'])."' AND pmid='{$pm['pmid']}'");

		$query = $db->simple_select("privatemessages", "pmid, deletetime", "folder='3' AND uid='".intval($pm['sender']['uid'])."' AND pmid='{$pm['pmid']}'");

		$draftcheck = $db->fetch_array($query);

// This PM was previously a draft
if($draftcheck['pmid'])
{

		$draftcheck = $db->fetch_array($query);

// This PM was previously a draft
if($draftcheck['pmid'])
{

 
			if($draftcheck['deletetime'])
{
// This draft was a reply to a PM
$pm['pmid'] = $draftcheck['deletetime'];
$pm['do'] = "reply";
}


			// Delete the old draft as we no longer need it
$db->delete_query("privatemessages", "pmid='{$draftcheck['pmid']}'");
}

			// Delete the old draft as we no longer need it
$db->delete_query("privatemessages", "pmid='{$draftcheck['pmid']}'");
}





		// Saving this message as a draft
if($pm['saveasdraft'])
{
$this->pm_insert_data['uid'] = $pm['sender']['uid'];

		// Saving this message as a draft
if($pm['saveasdraft'])
{
$this->pm_insert_data['uid'] = $pm['sender']['uid'];

 

// If this is a reply, then piggyback into the deletetime to let us know in the future
if($pm['do'] == "reply" || $pm['do'] == "replyall")
{
$this->pm_insert_data['deletetime'] = $pm['pmid'];
}


			$plugins->run_hooks_by_ref("datahandler_pm_insert_updatedraft", $this);
$db->insert_query("privatemessages", $this->pm_insert_data);


			$plugins->run_hooks_by_ref("datahandler_pm_insert_updatedraft", $this);
$db->insert_query("privatemessages", $this->pm_insert_data);


Zeile 598Zeile 612
		// Are we replying or forwarding an existing PM?
if($pm['pmid'])
{

		// Are we replying or forwarding an existing PM?
if($pm['pmid'])
{

			if($pm['do'] == "reply")

			if($pm['do'] == "reply" || $pm['do'] == "replyall")

			{
$sql_array = array(
'status' => 3,

			{
$sql_array = array(
'status' => 3,