Vergleich inc/datahandlers/post.php - 1.8.2 - 1.8.4

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 390Zeile 390
		}

// Check to see if this person is in a usergroup that is excluded

		}

// Check to see if this person is in a usergroup that is excluded

		if($mybb->settings['postmergeuignore'] == -1)
{
return true;
}
elseif($mybb->settings['postmergeuignore'] != '' && is_member($mybb->settings['postmergeuignore'], $post['uid']))

		if(is_member($mybb->settings['postmergeuignore'], $post['uid']))





		{
return true;
}

		{
return true;
}

Zeile 433Zeile 429
		}

if($simple_mode == true)

		}

if($simple_mode == true)

		{

		{

			return false;

			return false;

		}

		}


if($post['uid'])


if($post['uid'])

		{

		{

			$user_check = "uid='".$post['uid']."'";
}
else
{
$user_check = "ipaddress=".$db->escape_binary($session->packedip);

			$user_check = "uid='".$post['uid']."'";
}
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);
}

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

Zeile 494Zeile 490
			else
{
$parser_options['allow_smilies'] = 0;

			else
{
$parser_options['allow_smilies'] = 0;

			}

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

			}

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


// And count the number of image tags in the message.
$image_count = substr_count($image_check, "<img");

Zeile 504Zeile 500
			{
// 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']));

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

/**

				return false;
}
}
}

/**

	* Verifies the video count.
*
* @return boolean True when valid, false when not valid.

	* Verifies the video count.
*
* @return boolean True when valid, false when not valid.

Zeile 521Zeile 517
		$post = &$this->data;

// Get the permissions of the user who is making this post or thread

		$post = &$this->data;

// Get the permissions of the user who is making this post or thread

		$permissions = user_permissions($post['uid']);


		$permissions = user_permissions($post['uid']);


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

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

Zeile 533Zeile 529
				// 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;

			}
}
}

			}
}
}


/**
* Verify the reply-to post.


/**
* Verify the reply-to post.

Zeile 560Zeile 556
			{
return true;
}

			{
return true;
}

		}

		}


// If this post isn't a reply to a specific post, attach it to the first post.
if(!$post['replyto'])


// If this post isn't a reply to a specific post, attach it to the first post.
if(!$post['replyto'])

Zeile 596Zeile 592
		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;
}


/**
* Verify the dateline.


/**
* Verify the dateline.

Zeile 1118Zeile 1114
				AND s.uid != '{$post['uid']}'
AND u.lastactive>'{$thread['lastpost']}'
");

				AND s.uid != '{$post['uid']}'
AND u.lastactive>'{$thread['lastpost']}'
");

 

$args = array(
'this' => &$this,
'done_users' => &$done_users,
'users' => array()
);


			while($subscribedmember = $db->fetch_array($query))
{
if($done_users[$subscribedmember['uid']])
{
continue;
}

			while($subscribedmember = $db->fetch_array($query))
{
if($done_users[$subscribedmember['uid']])
{
continue;
}

 

$args['users'][$subscribedmember['uid']] = (int)$subscribedmember['uid'];


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

$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']);

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

$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']);

Zeile 1208Zeile 1214
					send_pm($pm, -1, true);
}
}

					send_pm($pm, -1, true);
}
}

 

$plugins->run_hooks('datahandler_post_insert_subscribed', $args);


			// Have one or more emails been queued? Update the queue count
if(isset($queued_email) && $queued_email == 1)
{

			// Have one or more emails been queued? Update the queue count
if(isset($queued_email) && $queued_email == 1)
{