Vergleich inc/datahandlers/post.php - 1.2.2 - 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: post.php 2394 2006-11-10 04:55:06Z Tikitiki $

 * $Id: post.php 3030 2007-04-26 00:19:47Z 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 42Zeile 48
	* @var string
*/
var $language_prefix = 'postdata';

	* @var string
*/
var $language_prefix = 'postdata';


/**


/**

	 * What are we performing?
* post = New post
* thread = New thread
* edit = Editing a thread or post

	 * What are we performing?
* post = New post
* thread = New thread
* edit = Editing a thread or post

	 */

	 */

	var $action;

	var $action;





	/**
* Array of data inserted in to a post.
*

	/**
* Array of data inserted in to a post.
*

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();





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

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

Zeile 78Zeile 84
	 * @var array
*/
var $thread_insert_data = array();

	 * @var array
*/
var $thread_insert_data = array();





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

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

	 *

	 *

	 * @var array

	 * @var array

	 */

	 */

	var $thread_update_data = array();

	var $thread_update_data = array();





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

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

Zeile 95Zeile 101

/**
* Verifies the author of a post and fetches the username if necessary.


/**
* Verifies the author of a post and fetches the username if necessary.

	 *

	 *

	 * @return boolean True if the author information is valid, false if invalid.
*/
function verify_author()

	 * @return boolean True if the author information is valid, false if invalid.
*/
function verify_author()

Zeile 147Zeile 153
		if($this->method == "update" && $post['pid'])
{
if(!$post['tid'])

		if($this->method == "update" && $post['pid'])
{
if(!$post['tid'])

			{

			{

				$query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='".intval($post['pid'])."'");
$post['tid'] = $db->fetch_field($query, "tid");
}

				$query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='".intval($post['pid'])."'");
$post['tid'] = $db->fetch_field($query, "tid");
}

Zeile 315Zeile 321
		// Check if this post contains more images than the forum allows
if($post['savedraft'] != 1 && $mybb->settings['maxpostimages'] != 0 && $permissions['cancp'] != "yes")
{

		// Check if this post contains more images than the forum allows
if($post['savedraft'] != 1 && $mybb->settings['maxpostimages'] != 0 && $permissions['cancp'] != "yes")
{

			if($post['options']['disablesmilies'] == "yes")
{
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;

// Parse the message.
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_smilies" => $forum['allowmilies'],
"allow_imgcode" => $forum['allowimgcode']
);

			require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;















				$image_check = $parser->parse_message($post['message'], $parser_options);

// And count the number of image tags in the message.
$image_count = substr_count($image_check, "<img");
if($image_count > $mybb->settings['maxpostimages'])
{
// Throw back a message if over the count with the number of images as well as the maximum number of images per post.
$this->set_error("too_many_images", array(1 => $image_count, 2 => $mybb->settings['maxpostimages']));
return false;
}








			// Parse the message.
$parser_options = array(
"allow_html" => $forum['allowhtml'],
"allow_mycode" => $forum['allowmycode'],
"allow_imgcode" => $forum['allowimgcode']
);

if($post['options']['disablesmilies'] != "yes")
{
$parser_options['allow_smilies'] = $forum['allowsmilies'];
}
else
{
$parser_options['allow_smilies'] = "no";
}

$image_check = $parser->parse_message($post['message'], $parser_options);





 
			// And count the number of image tags in the message.
$image_count = substr_count($image_check, "<img");
if($image_count > $mybb->settings['maxpostimages'])
{
// Throw back a message if over the count with the number of images as well as the maximum number of images per post.
$this->set_error("too_many_images", array(1 => $image_count, 2 => $mybb->settings['maxpostimages']));
return false;

			}
}
}

			}
}
}

Zeile 400Zeile 410
		if(!$post['icon'] || $post['icon'] < 0)
{
$post['icon'] = 0;

		if(!$post['icon'] || $post['icon'] < 0)
{
$post['icon'] = 0;

		}

		}

		return true;
}


		return true;
}


Zeile 428Zeile 438
	function validate_post()
{
global $mybb, $db, $plugins;

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





		$post = &$this->data;
$time = time();

// Verify all post assets.

		$post = &$this->data;
$time = time();

// Verify all post assets.


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

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






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

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

if($this->method == "insert" || array_key_exists('subject', $post))
{
$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();
}

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

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

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

		{

		{

			$this->verify_dateline();

			$this->verify_dateline();

		}

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

 
		}

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

		}

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

Zeile 488Zeile 498
			return true;
}
}

			return true;
}
}







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

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

Zeile 505Zeile 515
		if(!$this->get_validated())
{
die("The post needs to be validated before inserting it into the DB.");

		if(!$this->get_validated())
{
die("The post needs to be validated before inserting it into the DB.");

		}

		}

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

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

		{

		{

			die("The post is not valid.");

			die("The post is not valid.");

		}

		}


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


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

		{

		{

			$visible = -2;
}


			$visible = -2;
}


Zeile 522Zeile 532
		{
// Automatic subscription to the thread
if($post['options']['emailnotify'] != "no" && $post['uid'] > 0)

		{
// Automatic subscription to the thread
if($post['options']['emailnotify'] != "no" && $post['uid'] > 0)

			{

			{

				$query = $db->simple_select(TABLE_PREFIX."favorites", "fid", "uid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."' AND type='s'", array("limit" => 1));
$already_subscribed = $db->fetch_field($query, "fid");
if(!$already_subscribed)

				$query = $db->simple_select(TABLE_PREFIX."favorites", "fid", "uid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."' AND type='s'", array("limit" => 1));
$already_subscribed = $db->fetch_field($query, "fid");
if(!$already_subscribed)

Zeile 555Zeile 565

// Open the thread.
if($modoptions['closethread'] != "yes" && $thread['closed'] == "yes")


// Open the thread.
if($modoptions['closethread'] != "yes" && $thread['closed'] == "yes")

				{

				{

					$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)
{
$newstick = "sticky='1'";
log_moderator_action($modlogdata, "Thread stuck");

				// Stick the thread.
if($modoptions['stickthread'] == "yes" && $thread['sticky'] != 1)
{
$newstick = "sticky='1'";
log_moderator_action($modlogdata, "Thread stuck");

				}

				}


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


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

				{

				{

					$newstick = "sticky='0'";
log_moderator_action($modlogdata, "Thread unstuck");

					$newstick = "sticky='0'";
log_moderator_action($modlogdata, "Thread unstuck");

				}

// Execute moderation options.
if($newstick && $newclosed)
{
$sep = ",";
}
if($newstick || $newclosed)

				}

// Execute moderation options.
if($newstick && $newclosed)
{
$sep = ",";
}
if($newstick || $newclosed)

				{
$db->query("
UPDATE ".TABLE_PREFIX."threads

				{
$db->query("
UPDATE ".TABLE_PREFIX."threads

Zeile 588Zeile 598
					");
}
}

					");
}
}





			// Fetch the forum this post is being made in
$forum = get_forum($post['fid']);


			// Fetch the forum this post is being made in
$forum = get_forum($post['fid']);


Zeile 596Zeile 606
			if($forum['modposts'] == "yes" && is_moderator($thread['fid'], "", $thread['uid']) != "yes")
{
$visible = 0;

			if($forum['modposts'] == "yes" && is_moderator($thread['fid'], "", $thread['uid']) != "yes")
{
$visible = 0;

			}
else
{

			}
else
{

				$visible = 1;
}
}

				$visible = 1;
}
}


















		
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']}'");
}



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

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

Zeile 613Zeile 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']),

Zeile 632Zeile 657
			$this->pid = $post['pid'];
}
else

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

		{

		{

			// Insert the post.
$this->post_insert_data = array(
"tid" => intval($post['tid']),

			// Insert the post.
$this->post_insert_data = array(
"tid" => intval($post['tid']),

Zeile 649Zeile 674
				"smilieoff" => $post['options']['disablesmilies'],
"visible" => $visible,
"posthash" => $db->escape_string($post['posthash'])

				"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);





			$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();
}

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

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





		if($visible == 1)
{
$thread = get_thread($post['tid']);

		if($visible == 1)
{
$thread = get_thread($post['tid']);

Zeile 700Zeile 725
				elseif($mybb->settings['bblanguage'])
{
$uselang = $mybb->settings['bblanguage'];

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

				}
else

				}
else

				{
$uselang = "english";
}

				{
$uselang = "english";
}

Zeile 714Zeile 739
				else
{
if(!isset($langcache[$uselang]['emailsubject_subscription']))

				else
{
if(!isset($langcache[$uselang]['emailsubject_subscription']))

					{
$userlang = new MyLanguage;
$userlang->set_path(MYBB_ROOT."inc/languages");
$userlang->set_language($uselang);
$userlang->load("messages");

					{
$userlang = new MyLanguage;
$userlang->set_path(MYBB_ROOT."inc/languages");
$userlang->set_language($uselang);
$userlang->load("messages");

						$langcache[$uselang]['emailsubject_subscription'] = $userlang->emailsubject_subscription;
$langcache[$uselang]['email_subscription'] = $userlang->email_subscription;
unset($userlang);

						$langcache[$uselang]['emailsubject_subscription'] = $userlang->emailsubject_subscription;
$langcache[$uselang]['email_subscription'] = $userlang->email_subscription;
unset($userlang);

Zeile 732Zeile 757
					"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),

					"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),

					"message" => $db->escape_string($emailmessage)


					"message" => $db->escape_string($emailmessage),
"headers" => ''

				);
$db->insert_query(TABLE_PREFIX."mailqueue", $new_email);
unset($userlang);
$queued_email = 1;

				);
$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();
}

			// Have one or more emails been queued? Update the queue count
if($queued_email == 1)
{
$cache->updatemailqueue();
}

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

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

$thread_update['attachmentcount'] = "+{$attachmentcount}";


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

		}
// Post is stuck in moderation queue
else if($visible == 0)

		{

		{

			// Update the unapproved posts count for the current thread and current forum

			// 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 790Zeile 807
		$thread = &$this->data;

// Validate all thread assets.

		$thread = &$this->data;

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

Zeile 808Zeile 830
		}

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

		}

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

		{

		{

			$this->verify_dateline();

			$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(!$thread['savedraft'])

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






		{

		{

			$this->verify_post_flooding();

			$this->verify_options();

		}

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

		}

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

Zeile 984Zeile 1001
		if(!$thread['savedraft'])
{


		if(!$thread['savedraft'])
{


			// Automatic subscription to the thread

			// Automatically subscribe the user to this thread if they've chosen to.

			if($thread['options']['emailnotify'] != "no" && $thread['uid'] > 0)

			if($thread['options']['emailnotify'] != "no" && $thread['uid'] > 0)

			{
$favoriteadd = array(
"uid" => intval($thread['uid']),
"tid" => intval($this->tid),
"type" => "s"

			{
$insert_favorite = array(
'uid' => intval($thread['uid']),
'tid' => $this->tid,
'type' => 's'

				);

				);

				$db->insert_query(TABLE_PREFIX."favorites", $favoriteadd);

				$db->insert_query(TABLE_PREFIX.'favorites', $insert_favorite);

			}

// Perform any selected moderation tools.

			}

// Perform any selected moderation tools.

Zeile 1004Zeile 1021

// Close the thread.
if($modoptions['closethread'] == "yes")


// Close the thread.
if($modoptions['closethread'] == "yes")

				{

				{

					$newclosed = "closed='yes'";
log_moderator_action($modlogdata, "Thread closed");

					$newclosed = "closed='yes'";
log_moderator_action($modlogdata, "Thread closed");

				}


				}


				// Stick the thread.
if($modoptions['stickthread'] == "yes")
{
$newstick = "sticky='1'";
log_moderator_action($modlogdata, "Thread stuck");

				// Stick the thread.
if($modoptions['stickthread'] == "yes")
{
$newstick = "sticky='1'";
log_moderator_action($modlogdata, "Thread stuck");

				}

				}


// Execute moderation options.
if($newstick && $newclosed)
{
$sep = ",";


// Execute moderation options.
if($newstick && $newclosed)
{
$sep = ",";

				}

				}

				if($newstick || $newclosed)
{
$db->query("

				if($newstick || $newclosed)
{
$db->query("

Zeile 1047Zeile 1064
				}

// Only update the table if we need to.

				}

// Only update the table if we need to.

				if(is_array($update_query))

				if(!empty($update_query))

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

				{
$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("

			// 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("

Zeile 1069Zeile 1086
				if($done_users[$subscribedmember['uid']])
{
continue;

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

				$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']))

Zeile 1111Zeile 1128
					"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),

					"mailto" => $db->escape_string($subscribedmember['email']),
"mailfrom" => '',
"subject" => $db->escape_string($emailsubject),

					"message" => $db->escape_string($emailmessage)


					"message" => $db->escape_string($emailmessage),
"headers" => ''

				);
$db->insert_query(TABLE_PREFIX."mailqueue", $new_email);
unset($userlang);

				);
$db->insert_query(TABLE_PREFIX."mailqueue", $new_email);
unset($userlang);

Zeile 1122Zeile 1140
			{
$cache->updatemailqueue();
}

			{
$cache->updatemailqueue();
}

			// Automatically subscribe the user to this thread if they've chosen to.
if($thread['options']['emailnotify'] != "no" && $thread['uid'] > 0)
{
$insert_favorite = array(
'uid' => intval($thread['uid']),
'tid' => $this->tid,
'type' => 's'
);
$db->insert_query(TABLE_PREFIX.'favorites', $insert_favorite);
}
}


		}












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

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

		{

		{

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

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

Zeile 1144Zeile 1152
			$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']);












		$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}"));
}

if($visible == 1)
{
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 1290Zeile 1309
		{
$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']);

	}
}
?>

	}
}
?>