Vergleich inc/datahandlers/post.php - 1.2.5 - 1.2.14

  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: post.php 2729 2007-02-07 23:02:29Z Tikitiki $

 * $Id: post.php 4005 2008-07-10 17:53:25Z 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 60Zeile 66

/**
* Array of data used to update a post.


/**
* Array of data used to update a post.

	 *
* @var array
*/

	 *
* @var array
*/

	var $post_update_data = array();

/**

	var $post_update_data = array();

/**

Zeile 115Zeile 121
		{
$user = get_user($post['uid']);
$post['username'] = $user['username'];

		{
$user = get_user($post['uid']);
$post['username'] = $user['username'];

		}


		}


		// After all of this, if we still don't have a username, force the username as "Guest" (Note, this is not translatable as it is always a fallback)
if(!$post['username'])
{

		// After all of this, if we still don't have a username, force the username as "Guest" (Note, this is not translatable as it is always a fallback)
if(!$post['username'])
{

Zeile 152Zeile 158
				$post['tid'] = $db->fetch_field($query, "tid");
}
// Here we determine if we're editing the first post of a thread or not.

				$post['tid'] = $db->fetch_field($query, "tid");
}
// Here we determine if we're editing the first post of a thread or not.

			$options = array(
"limit" => 1,
"limit_start" => 0,

			$options = array(
"limit" => 1,
"limit_start" => 0,

				"order_by" => "dateline",
"order_dir" => "asc"
);

				"order_by" => "dateline",
"order_dir" => "asc"
);

Zeile 437Zeile 443
		$time = time();

// Verify all post assets.

		$time = time();

// Verify all post assets.








		
if($this->method != "update" && !$post['savedraft'])
{
$this->verify_post_flooding();
}


		if($this->method == "insert" || array_key_exists('uid', $post))

		if($this->method == "insert" || array_key_exists('uid', $post))

		{

		{

			$this->verify_author();

			$this->verify_author();

		}

		}


if($this->method == "insert" || array_key_exists('subject', $post))


if($this->method == "insert" || array_key_exists('subject', $post))

		{
$this->verify_subject();
}

		{
$this->verify_subject();
}


if($this->method == "insert" || array_key_exists('message', $post))


if($this->method == "insert" || array_key_exists('message', $post))

		{

		{

			$this->verify_message();
$this->verify_image_count();
}

			$this->verify_message();
$this->verify_image_count();
}

Zeile 457Zeile 468
		if($this->method == "insert" || array_key_exists('dateline', $post))
{
$this->verify_dateline();

		if($this->method == "insert" || array_key_exists('dateline', $post))
{
$this->verify_dateline();

		}

if($this->method != "update" && !$post['savedraft'])
{
$this->verify_post_flooding();
}


		}







		if($this->method == "insert" || array_key_exists('replyto', $post))
{
$this->verify_reply_to();
}

if($this->method == "insert" || array_key_exists('icon', $post))

		if($this->method == "insert" || array_key_exists('replyto', $post))
{
$this->verify_reply_to();
}

if($this->method == "insert" || array_key_exists('icon', $post))

		{

		{

			$this->verify_post_icon();

			$this->verify_post_icon();

		}


		}


		if($this->method == "insert" || array_key_exists('options', $post))

		if($this->method == "insert" || array_key_exists('options', $post))

		{

		{

			$this->verify_options();

			$this->verify_options();

		}

		}


$plugins->run_hooks_by_ref("datahandler_post_validate_post", $this);



$plugins->run_hooks_by_ref("datahandler_post_validate_post", $this);


Zeile 486Zeile 492
		if(count($this->get_errors()) > 0)
{
return false;

		if(count($this->get_errors()) > 0)
{
return false;

		}
else
{

		}
else
{

			return true;
}
}

			return true;
}
}







	/**
* Insert a post into the database.
*

	/**
* Insert a post into the database.
*

Zeile 507Zeile 513

// Yes, validating is required.
if(!$this->get_validated())


// Yes, validating is required.
if(!$this->get_validated())

		{

		{

			die("The post needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

			die("The post needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

Zeile 562Zeile 568
				{
$newclosed = "closed='no'";
log_moderator_action($modlogdata, "Thread opened");

				{
$newclosed = "closed='no'";
log_moderator_action($modlogdata, "Thread opened");

				}

				}


// Stick the thread.
if($modoptions['stickthread'] == "yes" && $thread['sticky'] != 1)


// Stick the thread.
if($modoptions['stickthread'] == "yes" && $thread['sticky'] != 1)

Zeile 598Zeile 604

// Decide on the visibility of this post.
if($forum['modposts'] == "yes" && is_moderator($thread['fid'], "", $thread['uid']) != "yes")


// Decide on the visibility of this post.
if($forum['modposts'] == "yes" && is_moderator($thread['fid'], "", $thread['uid']) != "yes")

			{
$visible = 0;
}














			{
$visible = 0;
}
else
{
$visible = 1;
}
}

if($visible == 1)
{
$now = time();
if($forum['usepostcounts'] != "no")
{
$queryadd = ",postnum=postnum+1";
}

			else
{

			else
{

				$visible = 1;

				$queryadd = '';

			}

			}

 
			$db->query("UPDATE ".TABLE_PREFIX."users SET lastpost='{$now}' {$queryadd} WHERE uid='{$post['uid']}'");

		}

		}

 



$post['pid'] = intval($post['pid']);
$post['uid'] = intval($post['uid']);


$post['pid'] = intval($post['pid']);
$post['uid'] = intval($post['uid']);

Zeile 617Zeile 638
		{
// Update a post that is a draft
$this->post_update_data = array(

		{
// Update a post that is a draft
$this->post_update_data = array(

				"subject" => $db->escape_string($post['subject']),
"icon" => intval($post['icon']),

				"subject" => $db->escape_string($post['subject']),
"icon" => intval($post['icon']),

				"uid" => $post['uid'],
"username" => $db->escape_string($post['username']),
"dateline" => intval($post['dateline']),

				"uid" => $post['uid'],
"username" => $db->escape_string($post['username']),
"dateline" => intval($post['dateline']),

				"message" => $db->escape_string($post['message']),
"ipaddress" => $db->escape_string($post['ipaddress']),
"includesig" => $post['options']['signature'],
"smilieoff" => $post['options']['disablesmilies'],
"visible" => $visible,
"posthash" => $db->escape_string($post['posthash'])
);

				"message" => $db->escape_string($post['message']),
"ipaddress" => $db->escape_string($post['ipaddress']),
"includesig" => $post['options']['signature'],
"smilieoff" => $post['options']['disablesmilies'],
"visible" => $visible,
"posthash" => $db->escape_string($post['posthash'])
);


$plugins->run_hooks_by_ref("datahandler_post_insert_post", $this);



$plugins->run_hooks_by_ref("datahandler_post_insert_post", $this);


Zeile 659Zeile 680

$db->insert_query(TABLE_PREFIX."posts", $this->post_insert_data);
$this->pid = $db->insert_id();


$db->insert_query(TABLE_PREFIX."posts", $this->post_insert_data);
$this->pid = $db->insert_id();

		}

		}


// Assign any uploaded attachments with the specific posthash to the newly created post.
if($post['posthash'])


// Assign any uploaded attachments with the specific posthash to the newly created post.
if($post['posthash'])

Zeile 676Zeile 697
			$thread = get_thread($post['tid']);
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new Postparser();

			$thread = get_thread($post['tid']);
require_once MYBB_ROOT.'inc/class_parser.php';
$parser = new Postparser();

 

$done_users = array();


$subject = $parser->parse_badwords($thread['subject']);
$excerpt = $parser->strip_mycode($post['message']);
$excerpt = my_substr($excerpt, 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;


$subject = $parser->parse_badwords($thread['subject']);
$excerpt = $parser->strip_mycode($post['message']);
$excerpt = my_substr($excerpt, 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;

 

// Parse badwords
$excerpt = $parser->parse_badwords($excerpt);



// Fetch any users subscribed to this thread and queue up their subscription notices
$query = $db->query("


// Fetch any users subscribed to this thread and queue up their subscription notices
$query = $db->query("

Zeile 748Zeile 775
			{
$cache->updatemailqueue();
}

			{
$cache->updatemailqueue();
}

 
			$thread_update = array("replies" => "+1"); 


// Update forum count


// Update forum count

			update_thread_count($post['tid']);
update_forum_count($post['fid']);
$cache->updatestats();

			update_thread_counters($post['tid'], $thread_update); 
update_forum_counters($post['fid'], array("posts" => "+1"));


		}
// Post is stuck in moderation queue
else if($visible == 0)
{
// Update the unapproved posts count for the current thread and current forum

		}
// Post is stuck in moderation queue
else if($visible == 0)
{
// Update the unapproved posts count for the current thread and current forum

			update_thread_count($post['tid']);
update_forum_count($post['fid']);
}

if($visible != -2)
{
$now = time();
if($forum['usepostcounts'] != "no")
{
$queryadd = ",postnum=postnum+1";
}
else
{
$queryadd = '';
}
$db->query("UPDATE ".TABLE_PREFIX."users SET lastpost='{$now}' {$queryadd} WHERE uid='{$post['uid']}'");

			update_thread_counters($post['tid'], array("unapprovedposts" => "+1")); 
update_forum_counters($post['fid'], array("unapprovedposts" => "+1"));















		}

// Return the post's pid and whether or not it is visible.

		}

// Return the post's pid and whether or not it is visible.

Zeile 791Zeile 804
	function validate_thread()
{
global $mybb, $db, $plugins;

	function validate_thread()
{
global $mybb, $db, $plugins;





		$thread = &$this->data;

		$thread = &$this->data;





		// Validate all thread assets.

		// Validate all thread assets.








		
if(!$thread['savedraft'])
{
$this->verify_post_flooding();
}


		if($this->method == "insert" || array_key_exists('uid', $thread))
{

		if($this->method == "insert" || array_key_exists('uid', $thread))
{

			$this->verify_author();
}

if($this->method == "insert" || array_key_exists('subject', $thread))
{
$this->verify_subject();

			$this->verify_author();
}

if($this->method == "insert" || array_key_exists('subject', $thread))
{
$this->verify_subject();

		}

if($this->method == "insert" || array_key_exists('message', $thread))

		}

if($this->method == "insert" || array_key_exists('message', $thread))

Zeile 815Zeile 833
		if($this->method == "insert" || array_key_exists('dateline', $thread))
{
$this->verify_dateline();

		if($this->method == "insert" || array_key_exists('dateline', $thread))
{
$this->verify_dateline();

		}


		}


		if($this->method == "insert" || array_key_exists('icon', $thread))

		if($this->method == "insert" || array_key_exists('icon', $thread))

		{

		{

			$this->verify_post_icon();

			$this->verify_post_icon();

		}

		}


if($this->method == "insert" || array_key_exists('options', $thread))
{
$this->verify_options();


if($this->method == "insert" || array_key_exists('options', $thread))
{
$this->verify_options();

		}

if(!$thread['savedraft'])
{
$this->verify_post_flooding();

 
		}

$plugins->run_hooks_by_ref("datahandler_post_validate_thread", $this);

// We are done validating, return.
$this->set_validated(true);

		}

$plugins->run_hooks_by_ref("datahandler_post_validate_thread", $this);

// We are done validating, return.
$this->set_validated(true);

		if(count($this->get_errors()) > 0)

		if(count($this->get_errors()) > 0)

		{
return false;
}

		{
return false;
}

Zeile 882Zeile 895

// Decide on the visibility of this post.
if(($forum['modthreads'] == "yes" || $forum['modposts'] == "yes") && is_moderator($thread['fid'], "", $thread['uid']) != "yes")


// Decide on the visibility of this post.
if(($forum['modthreads'] == "yes" || $forum['modposts'] == "yes") && is_moderator($thread['fid'], "", $thread['uid']) != "yes")

			{

			{

				$visible = 0;
}
else
{
$visible = 1;
}

				$visible = 0;
}
else
{
$visible = 1;
}

		}


		}


		// Have a post ID but not a thread ID - fetch thread ID
if($thread['pid'] && !$thread['tid'])
{
$query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='{$thread['pid']}");
$thread['tid'] = $db->fetch_field($query, "tid");

		// Have a post ID but not a thread ID - fetch thread ID
if($thread['pid'] && !$thread['tid'])
{
$query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='{$thread['pid']}");
$thread['tid'] = $db->fetch_field($query, "tid");

		}


		}


		$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "pid='{$thread['pid']}' AND uid='{$thread['uid']}' AND visible='-2'");
$draft_check = $db->fetch_field($query, "pid");


		$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "pid='{$thread['pid']}' AND uid='{$thread['uid']}' AND visible='-2'");
$draft_check = $db->fetch_field($query, "pid");


Zeile 935Zeile 948
			$db->update_query(TABLE_PREFIX."posts", $this->post_insert_data, "pid='{$thread['pid']}'");
$this->tid = $thread['tid'];
$this->pid = $thread['pid'];

			$db->update_query(TABLE_PREFIX."posts", $this->post_insert_data, "pid='{$thread['pid']}'");
$this->tid = $thread['tid'];
$this->pid = $thread['pid'];

		}

		}


// Inserting a new thread into the database.
else


// Inserting a new thread into the database.
else

Zeile 953Zeile 966
				"replies" => 0,
"visible" => $visible,
"notes" => ''

				"replies" => 0,
"visible" => $visible,
"notes" => ''

			);

			);


$plugins->run_hooks_by_ref("datahandler_post_insert_thread", $this);



$plugins->run_hooks_by_ref("datahandler_post_insert_thread", $this);


Zeile 981Zeile 994
			$this->pid = $db->insert_id();

// Now that we have the post id for this first post, update the threads table.

			$this->pid = $db->insert_id();

// Now that we have the post id for this first post, update the threads table.

			$firstpostup = array("firstpost" => $pid);
$db->update_query(TABLE_PREFIX."threads", $firstpostup, "tid='{$tid}'");

			$firstpostup = array("firstpost" => $this->pid);
$db->update_query(TABLE_PREFIX."threads", $firstpostup, "tid='{$this->tid}'");

		}

// If we're not saving a draft there are some things we need to check now

		}

// If we're not saving a draft there are some things we need to check now

Zeile 1035Zeile 1048
					");
}
}

					");
}
}

			// If we have a registered user then update their post count and last post times.
if($thread['uid'] > 0)

			
if($visible == 1)

			{

			{

				$user = get_user($thread['uid']);
$update_query = array();
// Only update the lastpost column of the user if the date of the thread is newer than their last post.
if($thread['dateline'] > $user['lastpost'])

				// If we have a registered user then update their post count and last post times.
if($thread['uid'] > 0)



				{

				{

					$update_query[] = "lastpost='".$thread['dateline']."'";
}
// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != "no")
{
$update_query[] = "postnum=postnum+1";
}

// Only update the table if we need to.
if(!empty($update_query))
{
$update_query = implode(", ", $update_query);
$db->query("UPDATE ".TABLE_PREFIX."users SET $update_query WHERE uid='".$thread['uid']."'");
}
}

// Queue up any forum subscription notices to users who are subscribed to this forum.
$excerpt = my_substr($thread['message'], 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;
$query = $db->query("
SELECT u.username, u.email, u.uid, u.language
FROM ".TABLE_PREFIX."forumsubscriptions fs, ".TABLE_PREFIX."users u
WHERE fs.fid='".intval($thread['fid'])."'
AND u.uid=fs.uid
AND fs.uid!='".intval($thread['uid'])."'
AND u.lastactive>'{$forum['lastpost']}'
");
while($subscribedmember = $db->fetch_array($query))
{
if($done_users[$subscribedmember['uid']])
{
continue;
}
$done_users[$subscribedmember['uid']] = 1;
// Determine the language pack we'll be using to send this email in and load it if it isn't already.
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];
}
else if($mybb->settings['bblanguage'])
{
$uselang = $mybb->settings['bblanguage'];
}
else
{
$uselang = "english";
}

					$user = get_user($thread['uid']);
$update_query = array();
// Only update the lastpost column of the user if the date of the thread is newer than their last post.
if($thread['dateline'] > $user['lastpost'])
{
$update_query[] = "lastpost='".$thread['dateline']."'";
}
// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != "no")
{
$update_query[] = "postnum=postnum+1";
}







































				if($uselang == $mybb->settings['bblanguage'])
{
$emailsubject = $lang->emailsubject_forumsubscription;
$emailmessage = $lang->email_forumsubscription;
}
else
{
if(!isset($langcache[$uselang]['emailsubject_forumsubscription']))

					// Only update the table if we need to.
if(!empty($update_query))







					{

					{

						$userlang = new MyLanguage;
$userlang->set_path(MYBB_ROOT."inc/languages");
$userlang->set_language($uselang);
$userlang->load("messages");
$langcache[$uselang]['emailsubject_forumsubscription'] = $userlang->emailsubject_forumsubscription;
$langcache[$uselang]['email_forumsubscription'] = $userlang->email_forumsubscription;
unset($userlang);

						$update_query = implode(", ", $update_query);
$db->query("UPDATE ".TABLE_PREFIX."users SET $update_query WHERE uid='".$thread['uid']."'");






					}

					}

					$emailsubject = $langcache[$uselang]['emailsubject_forumsubscription'];
$emailmessage = $langcache[$uselang]['email_forumsubscription'];

 
				}

				}

				$emailsubject = sprintf($emailsubject, $forum['name']);
$emailmessage = sprintf($emailmessage, $subscribedmember['username'], $thread['username'], $forum['name'], $mybb->settings['bbname'], $thread['subject'], $excerpt, $mybb->settings['bburl'], $this->tid, $thread['fid']);
$new_email = array(
"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),
"message" => $db->escape_string($emailmessage),
"headers" => ''
);
$db->insert_query(TABLE_PREFIX."mailqueue", $new_email);
unset($userlang);
$queued_email = 1;
}
// Have one or more emails been queued? Update the queue count
if($queued_email == 1)
{
$cache->updatemailqueue();





























































// Queue up any forum subscription notices to users who are subscribed to this forum.
$excerpt = my_substr($thread['message'], 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;

// Parse badwords
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;
$excerpt = $parser->parse_badwords($excerpt);

$query = $db->query("
SELECT u.username, u.email, u.uid, u.language
FROM ".TABLE_PREFIX."forumsubscriptions fs, ".TABLE_PREFIX."users u
WHERE fs.fid='".intval($thread['fid'])."'
AND u.uid=fs.uid
AND fs.uid!='".intval($thread['uid'])."'
AND u.lastactive>'{$forum['lastpost']}'
");
while($subscribedmember = $db->fetch_array($query))
{
if($done_users[$subscribedmember['uid']])
{
continue;
}
$done_users[$subscribedmember['uid']] = 1;
// Determine the language pack we'll be using to send this email in and load it if it isn't already.
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];
}
else if($mybb->settings['bblanguage'])
{
$uselang = $mybb->settings['bblanguage'];
}
else
{
$uselang = "english";
}

if($uselang == $mybb->settings['bblanguage'])
{
$emailsubject = $lang->emailsubject_forumsubscription;
$emailmessage = $lang->email_forumsubscription;
}
else
{
if(!isset($langcache[$uselang]['emailsubject_forumsubscription']))
{
$userlang = new MyLanguage;
$userlang->set_path(MYBB_ROOT."inc/languages");
$userlang->set_language($uselang);
$userlang->load("messages");
$langcache[$uselang]['emailsubject_forumsubscription'] = $userlang->emailsubject_forumsubscription;
$langcache[$uselang]['email_forumsubscription'] = $userlang->email_forumsubscription;
unset($userlang);
}
$emailsubject = $langcache[$uselang]['emailsubject_forumsubscription'];
$emailmessage = $langcache[$uselang]['email_forumsubscription'];
}
$emailsubject = sprintf($emailsubject, $forum['name']);
$emailmessage = sprintf($emailmessage, $subscribedmember['username'], $thread['username'], $forum['name'], $mybb->settings['bbname'], $thread['subject'], $excerpt, $mybb->settings['bburl'], $this->tid, $thread['fid']);
$new_email = array(
"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),
"message" => $db->escape_string($emailmessage),
"headers" => ''
);
$db->insert_query(TABLE_PREFIX."mailqueue", $new_email);
unset($userlang);
$queued_email = 1;
}
// Have one or more emails been queued? Update the queue count
if($queued_email == 1)
{
$cache->updatemailqueue();
}

			}
}


			}
}


Zeile 1140Zeile 1163
			$db->update_query(TABLE_PREFIX."attachments", $attachmentassign, "posthash='{$thread['posthash']}'");
}


			$db->update_query(TABLE_PREFIX."attachments", $attachmentassign, "posthash='{$thread['posthash']}'");
}


		// Thread is public - update the forum counts.
if($visible == 1 || $visible == 0)
{
$cache->updatestats();
update_thread_count($this->tid);
update_forum_count($thread['fid']);












		if($visible == 1) 
{
$query = $db->simple_select(TABLE_PREFIX."attachments", "COUNT(aid) AS attachmentcount", "pid='{$this->pid}' AND visible='1'");
$attachmentcount = $db->fetch_field($query, "attachmentcount");
if($attachmentcount > 0)
{
update_thread_counters($this->tid, array("attachmentcount" => "+{$attachmentcount}"));
}

update_thread_data($this->tid);
update_forum_counters($thread['fid'], array("threads" => "+1", "posts" => "+1"));
}
else if($visible == 0)
{
update_thread_data($this->tid);
update_thread_counters($thread['tid'], array("replies" => 0, "unapprovedposts" => 1));
update_forum_counters($thread['fid'], array("unapprovedthreads" => "+1", "unapprovedposts" => "+1"));

		}

// Return the post's pid and whether or not it is visible.

		}

// Return the post's pid and whether or not it is visible.

Zeile 1153Zeile 1187
			"pid" => $this->pid,
"tid" => $this->tid,
"visible" => $visible

			"pid" => $this->pid,
"tid" => $this->tid,
"visible" => $visible

		);

		);

	}

/**

	}

/**

Zeile 1222Zeile 1256
				$plugins->run_hooks_by_ref("datahandler_post_update_thread", $this);

$db->update_query(TABLE_PREFIX."threads", $this->thread_update_data, "tid='".intval($post['tid'])."'");

				$plugins->run_hooks_by_ref("datahandler_post_update_thread", $this);

$db->update_query(TABLE_PREFIX."threads", $this->thread_update_data, "tid='".intval($post['tid'])."'");

			}
}

// Prepare array for post updating.


			}
}

// Prepare array for post updating.


		$this->pid = $post['pid'];

if(isset($post['subject']))

		$this->pid = $post['pid'];

if(isset($post['subject']))

Zeile 1262Zeile 1296
			$this->post_update_data['edituid'] = intval($post['edit_uid']);
$this->post_update_data['edittime'] = time();
}

			$this->post_update_data['edituid'] = intval($post['edit_uid']);
$this->post_update_data['edittime'] = time();
}



		

		$plugins->run_hooks_by_ref("datahandler_post_update", $this);

$db->update_query(TABLE_PREFIX."posts", $this->post_update_data, "pid='".intval($post['pid'])."'");

		$plugins->run_hooks_by_ref("datahandler_post_update", $this);

$db->update_query(TABLE_PREFIX."posts", $this->post_update_data, "pid='".intval($post['pid'])."'");

Zeile 1286Zeile 1320
		{
$db->delete_query(TABLE_PREFIX."favorites", "type='s' AND uid='{$post['uid']}' AND tid='{$post['tid']}'");
}

		{
$db->delete_query(TABLE_PREFIX."favorites", "type='s' AND uid='{$post['uid']}' AND tid='{$post['tid']}'");
}

		update_thread_attachment_count($post['tid']);

 




		update_forum_count($post['fid']);

		update_forum_lastpost($post['fid']);

	}
}
?>

	}
}
?>