Vergleich inc/datahandlers/post.php - 1.4.2 - 1.4.5

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * Website: http://www.mybboard.net
* License: http://www.mybboard.net/about/license
*

 * $Id: post.php 4176 2008-09-03 13:50:09Z Tikitiki $

 * $Id: post.php 4328 2009-03-09 21:58:37Z Tikitiki $

 */

// Disallow direct access to this file for security reasons

 */

// Disallow direct access to this file for security reasons

Zeile 873Zeile 873
					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)
{
continue;
}


				if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];

				if($subscribedmember['language'] != '' && $lang->language_exists($subscribedmember['language']))
{
$uselang = $subscribedmember['language'];

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

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

		}

		}

		else
{
return true;

		else
{
return true;

Zeile 1244Zeile 1251
				{
$forum['lastpost'] = 0;
}

				{
$forum['lastpost'] = 0;
}





				
$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 1266Zeile 1275
				while($subscribedmember = $db->fetch_array($query))
{
if($done_users[$subscribedmember['uid']])

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

					{

					{

						continue;

						continue;

					}

					}

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

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

 
					
$forumpermissions = forum_permissions($thread['fid'], $subscribedmember['uid']);
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
{
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 1391Zeile 1407
		$forum = get_forum($post['fid']);

// Decide on the visibility of this post.

		$forum = get_forum($post['fid']);

// Decide on the visibility of this post.

		if($forum['mod_edit_posts'] == 1 && !is_moderator($post['fid'], "", $post['uid']))
{
if($existing_post['visible'] == 1)
{
update_thread_data($existing_post['tid']);
update_thread_counters($existing_post['tid'], array('replies' => '-1', 'unapprovedposts' => '+1'));
update_forum_counters($existing_post['fid'], array('unapprovedthreads' => '+1', 'unapprovedposts' => '+1'));

// Subtract from the users post count
// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != 0)
{
$db->write_query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum-1 WHERE uid='{$existing_post['uid']}'");
}
}
























		if(isset($post['visible']) && $post['visible'] != $existing_post['visible'])
{
if($forum['mod_edit_posts'] == 1 && !is_moderator($post['fid'], "", $post['uid']))
{
if($existing_post['visible'] == 1)
{
update_thread_data($existing_post['tid']);
update_thread_counters($existing_post['tid'], array('replies' => '-1', 'unapprovedposts' => '+1'));
update_forum_counters($existing_post['fid'], array('unapprovedthreads' => '+1', 'unapprovedposts' => '+1'));

// Subtract from the users post count
// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != 0)
{
$db->write_query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum-1 WHERE uid='{$existing_post['uid']}'");
}
}
$visible = 0;
}
else
{
if($existing_post['visible'] == 0)
{
update_thread_data($existing_post['tid']);
update_thread_counters($existing_post['tid'], array('replies' => '+1', 'unapprovedposts' => '-1'));
update_forum_counters($existing_post['fid'], array('unapprovedthreads' => '-1', 'unapprovedposts' => '-1'));

// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != 0)
{
$db->write_query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum+1 WHERE uid='{$existing_post['uid']}'");
}
}
$visible = 1;
}
}
else
{

			$visible = 0;

			$visible = 0;

		}
else
{
if($existing_post['visible'] == 0)

			if($forum['mod_edit_posts'] != 1 || is_moderator($post['fid'], "", $post['uid']))




			{

			{

				update_thread_data($existing_post['tid']);
update_thread_counters($existing_post['tid'], array('replies' => '+1', 'unapprovedposts' => '-1'));
update_forum_counters($existing_post['fid'], array('unapprovedthreads' => '-1', 'unapprovedposts' => '-1'));

// Update the post count if this forum allows post counts to be tracked
if($forum['usepostcounts'] != 0)
{
$db->write_query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum+1 WHERE uid='{$existing_post['uid']}'");
}

				$visible = 1;









			}

			}

			$visible = 1;
}

        }



// Check if this is the first post in a thread.
$options = array(


// Check if this is the first post in a thread.
$options = array(

Zeile 1532Zeile 1559
		}
else
{

		}
else
{

			$db->delete_query("threadsubscriptions", "uid='{$post['uid']}' AND tid='{$post['tid']}'");

			$db->delete_query("threadsubscriptions", "uid='".intval($post['uid'])."' AND tid='".intval($post['tid'])."'");

		}

update_forum_lastpost($post['fid']);

		}

update_forum_lastpost($post['fid']);