Vergleich inc/datahandlers/post.php - 1.6.0 - 1.6.10

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * Website: http://mybb.com
* License: http://mybb.com/about/license
*

 * $Id: post.php 5171 2010-08-02 21:13:47Z RyanGordon $

 * $Id$

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 145Zeile 145
		global $db;
$post = &$this->data;
$subject = &$post['subject'];

		global $db;
$post = &$this->data;
$subject = &$post['subject'];

 
		$subject = trim_blank_chrs($subject);


// Are we editing an existing thread or post?
if($this->method == "update" && $post['pid'])


// Are we editing an existing thread or post?
if($this->method == "update" && $post['pid'])

Zeile 173Zeile 174
			}

// If this is the first post there needs to be a subject, else make it the default one.

			}

// If this is the first post there needs to be a subject, else make it the default one.

			if(my_strlen(trim_blank_chrs($subject)) == 0 && $first_post)

			if(my_strlen($subject) == 0 && $first_post)

			{
$this->set_error("firstpost_no_subject");
return false;

			{
$this->set_error("firstpost_no_subject");
return false;

Zeile 188Zeile 189
		// This is a new post
else if($this->action == "post")
{

		// This is a new post
else if($this->action == "post")
{

			if(my_strlen(trim_blank_chrs($subject)) == 0)

			if(my_strlen($subject) == 0)

			{
$thread = get_thread($post['tid']);
$subject = "RE: ".$thread['subject'];

			{
$thread = get_thread($post['tid']);
$subject = "RE: ".$thread['subject'];

Zeile 198Zeile 199
		// This is a new thread and we require that a subject is present.
else
{

		// This is a new thread and we require that a subject is present.
else
{

			if(my_strlen(trim_blank_chrs($subject)) == 0)

			if(my_strlen($subject) == 0)

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

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

 
		}

// If post is reply and begins with "RE: ", remove 4 from subject length.
$subject_length = my_strlen($subject);
if($this->action == "post")
{
$position_re = my_strpos($subject, "RE: ");
if($position_re !== false && $position_re == 0)
{
$subject_length = $subject_length - 4;
}
}

if($subject_length > 85)
{
// Subject is too long
$this->set_error('subject_too_long', my_strlen($subject));
return false;

		}

// Subject is valid - return true.
return true;
}

		}

// Subject is valid - return true.
return true;
}





	/**
* Verifies a post message.
*

	/**
* Verifies a post message.
*

Zeile 219Zeile 238
		global $mybb;

$post = &$this->data;

		global $mybb;

$post = &$this->data;

		


		$post['message'] = trim_blank_chrs($post['message']);


		// Do we even have a message at all?

		// Do we even have a message at all?

		if(my_strlen(trim_blank_chrs($post['message'])) == 0)

		if(my_strlen($post['message']) == 0)

		{
$this->set_error("missing_message");
return false;

		{
$this->set_error("missing_message");
return false;

Zeile 239Zeile 259
		{
$this->set_error("message_too_short", array($mybb->settings['minmessagelength']));
return false;

		{
$this->set_error("message_too_short", array($mybb->settings['minmessagelength']));
return false;

		}
return true;
}


		}
return true;
}


	/**
* Verifies the specified post options are correct.
*

	/**
* Verifies the specified post options are correct.
*

Zeile 255Zeile 275
		// Verify yes/no options.
$this->verify_yesno_option($options, 'signature', 0);
$this->verify_yesno_option($options, 'disablesmilies', 0);

		// Verify yes/no options.
$this->verify_yesno_option($options, 'signature', 0);
$this->verify_yesno_option($options, 'disablesmilies', 0);


return true;
}



return true;
}


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

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

Zeile 267Zeile 287
	function verify_post_flooding()
{
global $mybb;

	function verify_post_flooding()
{
global $mybb;





		$post = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.
if($mybb->settings['postfloodcheck'] == 1 && $post['uid'] != 0 && $this->admin_override == false)
{
if($this->verify_post_merge(true) !== true)

		$post = &$this->data;

// Check if post flooding is enabled within MyBB or if the admin override option is specified.
if($mybb->settings['postfloodcheck'] == 1 && $post['uid'] != 0 && $this->admin_override == false)
{
if($this->verify_post_merge(true) !== true)

			{
return true;
}

			{
return true;
}

			
// Fetch the user information for this post - used to check their last post date.
$user = get_user($post['uid']);

			
// Fetch the user information for this post - used to check their last post date.
$user = get_user($post['uid']);

Zeile 309Zeile 329
		
// Are we starting a new thread?
if(!$post['tid'])

		
// Are we starting a new thread?
if(!$post['tid'])

		{
return true;
}

		{
return true;
}

		
// Are we even turned on?
if(empty($mybb->settings['postmergemins']))

		
// Are we even turned on?
if(empty($mybb->settings['postmergemins']))

Zeile 345Zeile 365
		
// Check to see if the same author has posted within the merge post time limit
if((intval($mybb->settings['postmergemins']) != 0 && trim($mybb->settings['postmergemins']) != "") && (TIME_NOW-$thread['lastpost']) > (intval($mybb->settings['postmergemins'])*60))

		
// Check to see if the same author has posted within the merge post time limit
if((intval($mybb->settings['postmergemins']) != 0 && trim($mybb->settings['postmergemins']) != "") && (TIME_NOW-$thread['lastpost']) > (intval($mybb->settings['postmergemins'])*60))

		{
return true;

		{
return true;

		}

if(strstr($mybb->settings['postmergefignore'], ','))

		}

if(strstr($mybb->settings['postmergefignore'], ','))

Zeile 382Zeile 402
			$user_check = "ipaddress='".$db->escape_string($session->ipaddress)."'";
}


			$user_check = "ipaddress='".$db->escape_string($session->ipaddress)."'";
}


		$query = $db->simple_select("posts", "pid,message,visible,posthash", "{$user_check} AND tid='".$post['tid']."' AND dateline='".$thread['lastpost']."'", array('order_by' => 'pid', 'order_dir' => 'DESC', 'limit' => 1));

		$query = $db->simple_select("posts", "pid,message,visible", "{$user_check} AND tid='".$post['tid']."' AND dateline='".$thread['lastpost']."'", array('order_by' => 'pid', 'order_dir' => 'DESC', 'limit' => 1));

		return $db->fetch_array($query);
}


		return $db->fetch_array($query);
}


Zeile 622Zeile 642
		}

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

		}

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

		{
$this->verify_options();
}

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

// We are done validating, return.

		{
$this->verify_options();
}

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

// We are done validating, return.

		$this->set_validated(true);
if(count($this->get_errors()) > 0)
{

		$this->set_validated(true);
if(count($this->get_errors()) > 0)
{

Zeile 698Zeile 718
				$modoptions = $post['modoptions'];
$modlogdata['fid'] = $thread['fid'];
$modlogdata['tid'] = $thread['tid'];

				$modoptions = $post['modoptions'];
$modlogdata['fid'] = $thread['fid'];
$modlogdata['tid'] = $thread['tid'];





				// Close the thread.
if($modoptions['closethread'] == 1 && $thread['closed'] != 1)
{

				// Close the thread.
if($modoptions['closethread'] == 1 && $thread['closed'] != 1)
{

Zeile 751Zeile 771
				$visible = 0;
}
else

				$visible = 0;
}
else

			{

			{

				$visible = 1;

				$visible = 1;

			}


			}


			// Are posts from this user being moderated? Change visibility
if($mybb->user['uid'] == $post['uid'] && $mybb->user['moderateposts'] == 1)
{
$visible = 0;
}

			// Are posts from this user being moderated? Change visibility
if($mybb->user['uid'] == $post['uid'] && $mybb->user['moderateposts'] == 1)
{
$visible = 0;
}

 
		}

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

if($post['pid'] > 0)
{
$query = $db->simple_select("posts", "tid", "pid='{$post['pid']}' AND uid='{$post['uid']}' AND visible='-2'");
$draft_check = $db->fetch_field($query, "tid");
}
else
{
$draft_check = false;

		}

if($this->method != "update" && $visible == 1)

		}

if($this->method != "update" && $visible == 1)

Zeile 767Zeile 800
			$double_post = $this->verify_post_merge();

// Only combine if they are both invisible (mod queue'd forum) or both visible

			$double_post = $this->verify_post_merge();

// Only combine if they are both invisible (mod queue'd forum) or both visible

			if($double_post !== true && $double_post['visible'] == $visible)
{

			if($double_post !== true && $double_post['visible'] == $visible)
{

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

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

				
$post['message'] = $double_post['message'] .= $mybb->settings['postmergesep']."\n".$post['message'];

				
$post['message'] = $double_post['message'] .= "\n".$mybb->settings['postmergesep']."\n".$post['message'];

				$update_query = array(
"message" => $db->escape_string($double_post['message'])
);
$update_query['edituid'] = intval($post['uid']);
$update_query['edittime'] = TIME_NOW;
$query = $db->update_query("posts", $update_query, "pid='".$double_post['pid']."'");

				$update_query = array(
"message" => $db->escape_string($double_post['message'])
);
$update_query['edituid'] = intval($post['uid']);
$update_query['edittime'] = TIME_NOW;
$query = $db->update_query("posts", $update_query, "pid='".$double_post['pid']."'");

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











				
if($draft_check)
{
$db->delete_query("posts", "pid='".$post['pid']."'");
}

// Assign any uploaded attachments with the specific posthash to the merged post.
$post['posthash'] = $db->escape_string($post['posthash']);

$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='0' AND visible='1' AND posthash='{$post['posthash']}'");
$attachmentcount = $db->fetch_field($query, "attachmentcount");

if($attachmentcount > 0)

				{

				{

					$post['posthash'] = $db->escape_string($post['posthash']);
$double_post['posthash'] = $db->escape_string($double_post['posthash']);

$query = $db->simple_select("attachments", "COUNT(aid) AS attachmentcount", "pid='0' AND visible='1' AND posthash='{$post['posthash']}'");
$attachmentcount = $db->fetch_field($query, "attachmentcount");





					// Update forum count
update_thread_counters($post['tid'], array('attachmentcount' => "+{$attachmentcount}"));
}

$attachmentassign = array(
"pid" => $double_post['pid'],
"posthash" => ''
);
$db->update_query("attachments", $attachmentassign, "posthash='{$post['posthash']}'");

				

				

					if($attachmentcount > 0)
{
// Update forum count
update_thread_counters($post['tid'], array('attachmentcount' => "+{$attachmentcount}"));
}

$attachmentassign = array(
"pid" => $double_post['pid'],
"posthash" => $double_post['posthash'],
);
$db->update_query("attachments", $attachmentassign, "posthash='{$post['posthash']}'");

$post['posthash'] = $double_post['posthash'];
}


 
				// Return the post's pid and whether or not it is visible.
return array(
"pid" => $double_post['pid'],

				// Return the post's pid and whether or not it is visible.
return array(
"pid" => $double_post['pid'],

Zeile 811Zeile 843
			}
}


			}
}


		if($visible == 1 && $thread['visible'] == 1)
{

		if($visible == 1 && $thread['visible'] == 1)
{

			$now = TIME_NOW;

			$now = TIME_NOW;





			// Yes, the value to the lastpost key in this array has single quotes within double quotes. It's not a bug.
$update_array = array(
'lastpost' => "'{$now}'"

			// Yes, the value to the lastpost key in this array has single quotes within double quotes. It's not a bug.
$update_array = array(
'lastpost' => "'{$now}'"

Zeile 825Zeile 857
			}

$db->update_query("users", $update_array, "uid='{$post['uid']}'", 1, true);

			}

$db->update_query("users", $update_array, "uid='{$post['uid']}'", 1, true);

		}

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

if($post['pid'] > 0)
{
$query = $db->simple_select("posts", "tid", "pid='{$post['pid']}' AND uid='{$post['uid']}' AND visible='-2'");
$draft_check = $db->fetch_field($query, "tid");
}
else
{
$draft_check = false;

 
		}

// Are we updating a post which is already a draft? Perhaps changing it into a visible post?

		}

// Are we updating a post which is already a draft? Perhaps changing it into a visible post?

Zeile 850Zeile 869
				"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']),
"longipaddress" => intval(my_ip2long($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);

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

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



$db->update_query("posts", $this->post_update_data, "pid='{$post['pid']}'");
$this->pid = $post['pid'];


$db->update_query("posts", $this->post_update_data, "pid='{$post['pid']}'");
$this->pid = $post['pid'];

Zeile 881Zeile 899
				"longipaddress" => intval(my_ip2long($post['ipaddress'])),
"includesig" => $post['options']['signature'],
"smilieoff" => $post['options']['disablesmilies'],

				"longipaddress" => intval(my_ip2long($post['ipaddress'])),
"includesig" => $post['options']['signature'],
"smilieoff" => $post['options']['disablesmilies'],

				"visible" => $visible,
"posthash" => $db->escape_string($post['posthash'])

				"visible" => $visible


			);


			);


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

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


$this->pid = $db->insert_query("posts", $this->post_insert_data);
}


$this->pid = $db->insert_query("posts", $this->post_insert_data);
}

Zeile 895Zeile 912
		{
$post['posthash'] = $db->escape_string($post['posthash']);
$attachmentassign = array(

		{
$post['posthash'] = $db->escape_string($post['posthash']);
$attachmentassign = array(

				"pid" => $this->pid


				"pid" => $this->pid,
"posthash" => ''

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

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

Zeile 928Zeile 946
					continue;
}
$done_users[$subscribedmember['uid']] = 1;

					continue;
}
$done_users[$subscribedmember['uid']] = 1;

				

				

				$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

				$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)

				{

				{

				    continue;

				    continue;

				}







				}

if($thread['uid'] != $subscribedmember['uid'] && $forumpermissions['canonlyviewownthread'] == 1 && !is_moderator($thread['fid'], "", $subscribedmember['uid']))
{
// User isn't a moderator or the author of the thread...
continue;
}

				
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];
}
elseif($mybb->settings['orig_bblanguage'])

				
if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];
}
elseif($mybb->settings['orig_bblanguage'])

				{

				{

					$uselang = $mybb->settings['orig_bblanguage'];
}
else
{
$uselang = "english";

					$uselang = $mybb->settings['orig_bblanguage'];
}
else
{
$uselang = "english";

				}

				}


if($uselang == $mybb->settings['bblanguage'])
{


if($uselang == $mybb->settings['bblanguage'])
{

Zeile 1006Zeile 1030
			// Update the unapproved posts count for the current forum
update_thread_counters($post['tid'], array("replies" => "+1"));
update_forum_counters($post['fid'], array("unapprovedposts" => "+1"));

			// Update the unapproved posts count for the current forum
update_thread_counters($post['tid'], array("replies" => "+1"));
update_forum_counters($post['fid'], array("unapprovedposts" => "+1"));

 
		}

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

		}

// 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 1068Zeile 1099
		if($this->method == "insert" || array_key_exists('options', $thread))
{
$this->verify_options();

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

		}

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

		}

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


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


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

		{

		{

			return false;
}
else

			return false;
}
else

Zeile 1083Zeile 1114
			return true;
}
}

			return true;
}
}





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

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

Zeile 1110Zeile 1141

// This thread is being saved as a draft.
if($thread['savedraft'])


// This thread is being saved as a draft.
if($thread['savedraft'])

		{

		{

			$visible = -2;
}


			$visible = -2;
}


Zeile 1137Zeile 1168

// Have a post ID but not a thread ID - fetch thread ID
if($thread['pid'] && !$thread['tid'])


// Have a post ID but not a thread ID - fetch thread ID
if($thread['pid'] && !$thread['tid'])

		{

		{

			$query = $db->simple_select("posts", "tid", "pid='{$thread['pid']}");
$thread['tid'] = $db->fetch_field($query, "tid");
}

			$query = $db->simple_select("posts", "tid", "pid='{$thread['pid']}");
$thread['tid'] = $db->fetch_field($query, "tid");
}

Zeile 1165Zeile 1196
				"visible" => $visible
);


				"visible" => $visible
);


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


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


			$db->update_query("threads", $this->thread_insert_data, "tid='{$thread['tid']}'");

$this->post_insert_data = array(

			$db->update_query("threads", $this->thread_insert_data, "tid='{$thread['tid']}'");

$this->post_insert_data = array(

Zeile 1178Zeile 1209
				"ipaddress" => $db->escape_string(get_ip()),
"includesig" => $thread['options']['signature'],
"smilieoff" => $thread['options']['disablesmilies'],

				"ipaddress" => $db->escape_string(get_ip()),
"includesig" => $thread['options']['signature'],
"smilieoff" => $thread['options']['disablesmilies'],

				"visible" => $visible,
"posthash" => $db->escape_string($thread['posthash'])

				"visible" => $visible


			);

			);

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

			$plugins->run_hooks("datahandler_post_insert_thread_post", $this);


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


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

Zeile 1207Zeile 1237
				"notes" => ''
);


				"notes" => ''
);


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

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


$this->tid = $db->insert_query("threads", $this->thread_insert_data);



$this->tid = $db->insert_query("threads", $this->thread_insert_data);


Zeile 1224Zeile 1254
				"longipaddress" => intval(my_ip2long(get_ip())),
"includesig" => $thread['options']['signature'],
"smilieoff" => $thread['options']['disablesmilies'],

				"longipaddress" => intval(my_ip2long(get_ip())),
"includesig" => $thread['options']['signature'],
"smilieoff" => $thread['options']['disablesmilies'],

				"visible" => $visible,
"posthash" => $db->escape_string($thread['posthash'])

				"visible" => $visible


			);

			);

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

			$plugins->run_hooks("datahandler_post_insert_thread_post", $this);


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



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


Zeile 1242Zeile 1271
			if($thread['options']['subscriptionmethod'] != "" && $thread['uid'] > 0)
{
switch($thread['options']['subscriptionmethod'])

			if($thread['options']['subscriptionmethod'] != "" && $thread['uid'] > 0)
{
switch($thread['options']['subscriptionmethod'])

				{

				{

					case "instant":
$notification = 1;
break;

					case "instant":
$notification = 1;
break;

Zeile 1258Zeile 1287
			if(is_moderator($thread['fid'], "", $thread['uid']) && is_array($thread['modoptions']))
{
$lang->load($this->language_file, true);

			if(is_moderator($thread['fid'], "", $thread['uid']) && is_array($thread['modoptions']))
{
$lang->load($this->language_file, true);

				

				

				$modoptions = $thread['modoptions'];
$modlogdata['fid'] = $this->tid;
$modlogdata['tid'] = $thread['tid'];

				$modoptions = $thread['modoptions'];
$modlogdata['fid'] = $this->tid;
$modlogdata['tid'] = $thread['tid'];

Zeile 1323Zeile 1352
				}

$done_users = array();

				}

$done_users = array();

				

				

				// 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;


				// 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;


Zeile 1355Zeile 1384
					{
continue;
}

					{
continue;
}

					








if(!is_moderator($thread['fid'], "", $subscribedmember['uid']) && $forumpermissions['canonlyviewownthreads'] == 1)
{
// In a 'view own only' forum and not a moderator
continue;
}


					// 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']))
{

					// 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']))
{

Zeile 1418Zeile 1453
		{
$thread['posthash'] = $db->escape_string($thread['posthash']);
$attachmentassign = array(

		{
$thread['posthash'] = $db->escape_string($thread['posthash']);
$attachmentassign = array(

				"pid" => $this->pid


				"pid" => $this->pid,
"posthash" => ''

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

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

Zeile 1570Zeile 1606
			}
if(count($this->thread_update_data) > 0)
{

			}
if(count($this->thread_update_data) > 0)
{

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

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


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


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

Zeile 1616Zeile 1652

$this->post_update_data['visible'] = $visible;



$this->post_update_data['visible'] = $visible;


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

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


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



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