Vergleich inc/datahandlers/post.php - 1.8.13 - 1.8.20

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 241Zeile 241
	 */
function verify_message()
{

	 */
function verify_message()
{

		global $mybb;

		global $db, $mybb;


$post = &$this->data;
$post['message'] = trim_blank_chrs($post['message']);


$post = &$this->data;
$post['message'] = trim_blank_chrs($post['message']);

Zeile 252Zeile 252
			$this->set_error("missing_message");
return false;
}

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


// If this board has a maximum message length check if we're over it. Use strlen because SQL limits are in bytes
else if(strlen($post['message']) > $mybb->settings['maxmessagelength'] && $mybb->settings['maxmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid']))
{
$this->set_error("message_too_long", array($mybb->settings['maxmessagelength'], strlen($post['message'])));
return false;
}

// And if we've got a minimum message length do we meet that requirement too?

 
		else
{

		else
{

 
			$limit = (int)$mybb->settings['maxmessagelength'];
$dblimit = 0;

// If database is mysql or mysqli check field type and set max database limit
if(stripos($db->type, 'my') !== false)
{
$fields = $db->show_fields_from("posts");
$type = $fields[array_search('message', array_column($fields, 'Field'))]['Type'];
switch(strtolower($type))
{
case 'longtext':
$dblimit = 4294967295;
break;
case 'mediumtext':
$dblimit = 16777215;
break;
case 'text':
default:
$dblimit = 65535;
break;
}
}

if($limit > 0 || $dblimit > 0)
{
$is_moderator = is_moderator($post['fid'], "", $post['uid']);
// Consider minimum in user defined and database limit other than 0
if($limit > 0 && $dblimit > 0)
{
$limit = $is_moderator ? $dblimit : min($limit, $dblimit);
}
else
{
$limit = max($limit, $dblimit);
}

if(strlen($post['message']) > $limit && (!$is_moderator || $limit == $dblimit))
{
$this->set_error("message_too_long", array($limit, strlen($post['message'])));
return false;
}
}


			if(!isset($post['fid']))
{
$post['fid'] = 0;

			if(!isset($post['fid']))
{
$post['fid'] = 0;

			}


			}


			if(!$mybb->settings['mycodemessagelength'])
{
// Check to see of the text is full of MyCode
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;

			if(!$mybb->settings['mycodemessagelength'])
{
// Check to see of the text is full of MyCode
require_once MYBB_ROOT."inc/class_parser.php";
$parser = new postParser;





				$message = $parser->text_parse_message($post['message']);

if(my_strlen($message) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid']))

				$message = $parser->text_parse_message($post['message']);

if(my_strlen($message) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid']))

Zeile 284Zeile 319
			else if(my_strlen($post['message']) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid']))
{
$this->set_error("message_too_short", array($mybb->settings['minmessagelength']));

			else if(my_strlen($post['message']) < $mybb->settings['minmessagelength'] && $mybb->settings['minmessagelength'] > 0 && !is_moderator($post['fid'], "", $post['uid']))
{
$this->set_error("message_too_short", array($mybb->settings['minmessagelength']));

				return false;
}
}
return true;

				return false;
}
}
return true;

	}

/**

	}

/**

Zeile 330Zeile 365

// A little bit of calculation magic and moderator status checking.
if(TIME_NOW-$user['lastpost'] <= $mybb->settings['postfloodsecs'] && !is_moderator($post['fid'], "", $user['uid']))


// A little bit of calculation magic and moderator status checking.
if(TIME_NOW-$user['lastpost'] <= $mybb->settings['postfloodsecs'] && !is_moderator($post['fid'], "", $user['uid']))

			{

			{

				// Oops, user has been flooding - throw back error message.
$time_to_wait = ($mybb->settings['postfloodsecs'] - (TIME_NOW-$user['lastpost'])) + 1;
if($time_to_wait == 1)

				// Oops, user has been flooding - throw back error message.
$time_to_wait = ($mybb->settings['postfloodsecs'] - (TIME_NOW-$user['lastpost'])) + 1;
if($time_to_wait == 1)

Zeile 373Zeile 408

// Assign a default separator if none is specified
if(trim($mybb->settings['postmergesep']) == "")


// Assign a default separator if none is specified
if(trim($mybb->settings['postmergesep']) == "")

		{

		{

			$mybb->settings['postmergesep'] = "[hr]";

			$mybb->settings['postmergesep'] = "[hr]";

		}


		}


		// Check to see if this person is in a usergroup that is excluded
if(is_member($mybb->settings['postmergeuignore'], $post['uid']))

		// Check to see if this person is in a usergroup that is excluded
if(is_member($mybb->settings['postmergeuignore'], $post['uid']))

		{
return true;
}

		{
return true;
}


// Select the lastpost and fid information for this thread
$query = $db->simple_select("threads", "lastpost,fid", "lastposteruid='".$post['uid']."' AND tid='".$post['tid']."'", array('limit' => '1'));


// Select the lastpost and fid information for this thread
$query = $db->simple_select("threads", "lastpost,fid", "lastposteruid='".$post['uid']."' AND tid='".$post['tid']."'", array('limit' => '1'));

Zeile 394Zeile 429
		}

if($mybb->settings['postmergefignore'] == -1)

		}

if($mybb->settings['postmergefignore'] == -1)

		{

		{

			return true;

			return true;

		}

		}

		elseif($mybb->settings['postmergefignore'] != '')
{
$fids = explode(',', (string)$mybb->settings['postmergefignore']);

		elseif($mybb->settings['postmergefignore'] != '')
{
$fids = explode(',', (string)$mybb->settings['postmergefignore']);





			if(is_array($fids))
{
foreach($fids as &$fid)

			if(is_array($fids))
{
foreach($fids as &$fid)

Zeile 412Zeile 447
				if(in_array($thread['fid'], $fids))
{
return true;

				if(in_array($thread['fid'], $fids))
{
return true;

				}
}
}


				}
}
}


		if($simple_mode == true)
{
return false;

		if($simple_mode == true)
{
return false;

Zeile 424Zeile 459
		if($post['uid'])
{
$user_check = "uid='".$post['uid']."'";

		if($post['uid'])
{
$user_check = "uid='".$post['uid']."'";

		}

		}

		else
{
$user_check = "ipaddress=".$db->escape_binary($session->packedip);
}

		else
{
$user_check = "ipaddress=".$db->escape_binary($session->packedip);
}





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

/**
* Verifies the image count.

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

/**
* Verifies the image count.

	*
* @return boolean True when valid, false when not valid.

	*
* @return boolean True when valid, false when not valid.

	*/
function verify_image_count()
{

	*/
function verify_image_count()
{

Zeile 458Zeile 493

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


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

		{

		{

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


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


Zeile 470Zeile 505
				"allow_videocode" => $forum['allowvideocode'],
"filter_badwords" => 1
);

				"allow_videocode" => $forum['allowvideocode'],
"filter_badwords" => 1
);





			if($post['options']['disablesmilies'] != 1)

			if($post['options']['disablesmilies'] != 1)

			{

			{

				$parser_options['allow_smilies'] = $forum['allowsmilies'];
}
else
{
$parser_options['allow_smilies'] = 0;

				$parser_options['allow_smilies'] = $forum['allowsmilies'];
}
else
{
$parser_options['allow_smilies'] = 0;

			}


			}


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

// And count the number of image tags in the message.

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

// And count the number of image tags in the message.

Zeile 519Zeile 554
				// 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_videos", array(1 => $video_count, 2 => $mybb->settings['maxpostvideos']));
return false;

				// 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_videos", array(1 => $video_count, 2 => $mybb->settings['maxpostvideos']));
return false;

			}
}

return true;

			}
}

return true;

	}

/**

	}

/**

Zeile 543Zeile 578
			if(!$valid_post['pid'])
{
$post['replyto'] = 0;

			if(!$valid_post['pid'])
{
$post['replyto'] = 0;

			}

			}

			else
{
return true;

			else
{
return true;

Zeile 584Zeile 619
		if(empty($post['icon']) || !isset($posticons_cache[$post['icon']]))
{
$post['icon'] = 0;

		if(empty($post['icon']) || !isset($posticons_cache[$post['icon']]))
{
$post['icon'] = 0;

		}
return true;

		}
return true;

	}

/**

	}

/**

Zeile 646Zeile 681
				}

if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])) && (empty($this->data['tid']) || $prefix != $thread['prefix']))

				}

if(!is_member($prefix_cache['groups'], array('usergroup' => $user['usergroup'], 'additionalgroups' => $user['additionalgroups'])) && (empty($this->data['tid']) || $prefix != $thread['prefix']))

				{
$this->set_error('invalid_prefix');
return false;
}
}

				{
$this->set_error('invalid_prefix');
return false;
}
}

			if($prefix_cache['forums'] != "-1")
{
// Decide whether this prefix can be used in our forum

			if($prefix_cache['forums'] != "-1")
{
// Decide whether this prefix can be used in our forum

Zeile 692Zeile 727
					{
// Decide whether this prefix can be used in our forum
$forums = explode(",", $required['forums']);

					{
// Decide whether this prefix can be used in our forum
$forums = explode(",", $required['forums']);





						if(!in_array($forum['fid'], $forums))
{
continue;

						if(!in_array($forum['fid'], $forums))
{
continue;

Zeile 755Zeile 790
			if($first_check['pid'] == $post['pid'])
{
$this->first_post = true;

			if($first_check['pid'] == $post['pid'])
{
$this->first_post = true;

			}
}

			}
}


// Verify all post assets.


// Verify all post assets.





		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))
{
$this->verify_subject();


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

		}

		}


if($this->method == "insert" || array_key_exists('message', $post))
{
$this->verify_message();
$this->verify_image_count();
$this->verify_video_count();


if($this->method == "insert" || array_key_exists('message', $post))
{
$this->verify_message();
$this->verify_image_count();
$this->verify_video_count();

		}

		}


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


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

Zeile 795Zeile 830
		if($this->method == "insert" || array_key_exists('options', $post))
{
$this->verify_options();

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

		}

		}


if($this->method == "update" && $this->first_post)
{
$this->verify_prefix();


if($this->method == "update" && $this->first_post)
{
$this->verify_prefix();

		}

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

		}

$plugins->run_hooks("datahandler_post_validate_post", $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;

			return false;

		}

		}

		else
{
return true;
}
}

		else
{
return true;
}
}





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

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

Zeile 824Zeile 859
	function insert_post()
{
global $db, $mybb, $plugins, $cache, $lang;

	function insert_post()
{
global $db, $mybb, $plugins, $cache, $lang;





		$post = &$this->data;

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

		$post = &$this->data;

// 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 is not valid.");

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

		}

		}


// Fetch the thread
$thread = get_thread($post['tid']);


// Fetch the thread
$thread = get_thread($post['tid']);

Zeile 852Zeile 887
		else
{
// Automatic subscription to the thread

		else
{
// Automatic subscription to the thread

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

			if($post['uid'] > 0)

			{

			{

				switch($post['options']['subscriptionmethod'])


				require_once MYBB_ROOT."inc/functions_user.php";
if($post['options']['subscriptionmethod'] == "")

				{

				{

					case "pm":
$notification = 2;
break;
case "email":
$notification = 1;
break;
default:
$notification = 0;









					remove_subscribed_thread($post['tid'], $post['uid']);
}
else
{
switch($post['options']['subscriptionmethod'])
{
case "pm":
$notification = 2;
break;
case "email":
$notification = 1;
break;
default:
$notification = 0;
}
add_subscribed_thread($post['tid'], $notification, $post['uid']);

				}

				}


require_once MYBB_ROOT."inc/functions_user.php";
add_subscribed_thread($post['tid'], $notification, $post['uid']);

 
			}

// Perform any selected moderation tools.

			}

// Perform any selected moderation tools.

Zeile 901Zeile 942
				{
$modoptions_update['sticky'] = 1;
log_moderator_action($modlogdata, $lang->thread_stuck);

				{
$modoptions_update['sticky'] = 1;
log_moderator_action($modlogdata, $lang->thread_stuck);

				}


				}


				// Unstick the thread.
if(empty($modoptions['stickthread']) && $thread['sticky'] == 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))

				// Unstick the thread.
if(empty($modoptions['stickthread']) && $thread['sticky'] == 1 && is_moderator($post['fid'], "canstickunstickthreads", $post['uid']))

				{

				{

					$modoptions_update['sticky'] = 0;
log_moderator_action($modlogdata, $lang->thread_unstuck);
}

					$modoptions_update['sticky'] = 0;
log_moderator_action($modlogdata, $lang->thread_unstuck);
}

Zeile 915Zeile 956
				{
$db->update_query('threads', $modoptions_update, "tid='{$thread['tid']}'");
}

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

			}

			}


// 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 923Zeile 964
			// Decide on the visibility of this post.
$forumpermissions = forum_permissions($post['fid'], $post['uid']);
if($forumpermissions['modposts'] == 1 && !$ismod)

			// Decide on the visibility of this post.
$forumpermissions = forum_permissions($post['fid'], $post['uid']);
if($forumpermissions['modposts'] == 1 && !$ismod)

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

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


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


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

Zeile 1270Zeile 1311

// Update last poster
if($visible == 1 && $thread['visible'] != 1)


// Update last poster
if($visible == 1 && $thread['visible'] != 1)

		{

		{

			update_last_post($post['tid']);

			update_last_post($post['tid']);

		}


		}


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

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

Zeile 1290Zeile 1331
		);

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

		);

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





		return $this->return_values;
}


		return $this->return_values;
}


Zeile 1303Zeile 1344
	{
global $mybb, $db, $plugins;


	{
global $mybb, $db, $plugins;


		$thread = &$this->data;


		$thread = &$this->data;


		// Validate all thread assets.

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

		// 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 1371Zeile 1412
	function insert_thread()
{
global $db, $mybb, $plugins, $cache, $lang;

	function insert_thread()
{
global $db, $mybb, $plugins, $cache, $lang;





		// Yes, validating is required.
if(!$this->get_validated())
{
die("The thread needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

		// Yes, validating is required.
if(!$this->get_validated())
{
die("The thread needs to be validated before inserting it into the DB.");
}
if(count($this->get_errors()) > 0)

		{

		{

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

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

		}

$thread = &$this->data;


		}

$thread = &$this->data;


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


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


Zeile 1391Zeile 1432
		if($thread['savedraft'])
{
$visible = -2;

		if($thread['savedraft'])
{
$visible = -2;

		}


		}


		// Thread is being made now and we have a bit to do.
else
{
$forumpermissions = forum_permissions($thread['fid'], $thread['uid']);
// Decide on the visibility of this post.
if($forumpermissions['modthreads'] == 1 && !is_moderator($thread['fid'], "", $thread['uid']))

		// Thread is being made now and we have a bit to do.
else
{
$forumpermissions = forum_permissions($thread['fid'], $thread['uid']);
// Decide on the visibility of this post.
if($forumpermissions['modthreads'] == 1 && !is_moderator($thread['fid'], "", $thread['uid']))

			{
$visible = 0;

			{
$visible = 0;

			}
else
{

			}
else
{

Zeile 1412Zeile 1453
			{
$visible = 0;
}

			{
$visible = 0;
}

		}

		}


// Have a post ID but not a thread ID - fetch thread ID
if(!empty($thread['pid']) && !$thread['tid'])
{
$query = $db->simple_select("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(!empty($thread['pid']) && !$thread['tid'])
{
$query = $db->simple_select("posts", "tid", "pid='{$thread['pid']}");
$thread['tid'] = $db->fetch_field($query, "tid");

		}


		}


		if(isset($thread['pid']) && $thread['pid'] > 0)

		if(isset($thread['pid']) && $thread['pid'] > 0)

		{

		{

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

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

		}

		}

		else

		else

		{

		{

			$draft_check = false;
}

// Are we updating a post which is already a draft? Perhaps changing it into a visible post?
if($draft_check)

			$draft_check = false;
}

// Are we updating a post which is already a draft? Perhaps changing it into a visible post?
if($draft_check)

		{
$this->thread_insert_data = array(
"subject" => $db->escape_string($thread['subject']),
"icon" => (int)$thread['icon'],
"username" => $db->escape_string($thread['username']),
"dateline" => (int)$thread['dateline'],
"lastpost" => (int)$thread['dateline'],
"lastposter" => $db->escape_string($thread['username']),
"visible" => $visible

		{
$this->thread_insert_data = array(
"subject" => $db->escape_string($thread['subject']),
"icon" => (int)$thread['icon'],
"username" => $db->escape_string($thread['username']),
"dateline" => (int)$thread['dateline'],
"lastpost" => (int)$thread['dateline'],
"lastposter" => $db->escape_string($thread['username']),
"visible" => $visible

			);

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

			);

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

Zeile 1484Zeile 1525
				"replies" => 0,
"visible" => $visible,
"notes" => ''

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

			);

			);


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


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





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

$this->post_insert_data = array(

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

$this->post_insert_data = array(

Zeile 1505Zeile 1546
				"visible" => $visible
);
$plugins->run_hooks("datahandler_post_insert_thread_post", $this);

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





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

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

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

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

Zeile 1589Zeile 1630
					if($forum['usethreadcounts'] != 0)
{
$update_query['threadnum'] = 'threadnum+1';

					if($forum['usethreadcounts'] != 0)
{
$update_query['threadnum'] = 'threadnum+1';

					}


					}


					// Only update the table if we need to.
if(!empty($update_query))
{
$db->update_query("users", $update_query, "uid='{$thread['uid']}'", 1, true);
}

					// Only update the table if we need to.
if(!empty($update_query))
{
$db->update_query("users", $update_query, "uid='{$thread['uid']}'", 1, true);
}

				}

				}


if(!isset($forum['lastpost']))
{
$forum['lastpost'] = 0;


if(!isset($forum['lastpost']))
{
$forum['lastpost'] = 0;

				}

				}


$done_users = array();


$done_users = array();





				// Queue up any forum subscription notices to users who are subscribed to this forum.

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

				$excerpt = $thread['message'];


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


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







				$excerpt = $parser->text_parse_message($excerpt);
if(strlen($excerpt) > $mybb->settings['subscribeexcerpt'])
{
$excerpt = my_substr($excerpt, 0, $mybb->settings['subscribeexcerpt']).$lang->emailbit_viewthread;
}

				$query = $db->query("
SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate
FROM ".TABLE_PREFIX."forumsubscriptions fs

				$query = $db->query("
SELECT u.username, u.email, u.uid, u.language, u.loginkey, u.salt, u.regdate
FROM ".TABLE_PREFIX."forumsubscriptions fs