Vergleich inc/class_moderation.php - 1.6.10 - 1.6.12

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 546Zeile 546
		");
$num_unapproved_posts = $num_approved_posts = 0;
$message = '';

		");
$num_unapproved_posts = $num_approved_posts = 0;
$message = '';

 
		$threads = array();

		while($post = $db->fetch_array($query))
{

		while($post = $db->fetch_array($query))
{

 
			$threads[$post['tid']] = $post['tid'];

			if($first == 1)
{ // all posts will be merged into this one
$masterpid = $post['pid'];

			if($first == 1)
{ // all posts will be merged into this one
$masterpid = $post['pid'];

Zeile 606Zeile 608
				}
}
}

				}
}
}

		
$query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND visible='1'");
$attachment_count = $db->fetch_field($query2, "count");

$db->update_query("threads", array("attachmentcount" => $attachment_count), "tid = '{$mastertid}'");

 

// Update the message
$mergepost = array(


// Update the message
$mergepost = array(

Zeile 630Zeile 627
		// If the first post of a thread is merged out, the thread should be deleted
$query = $db->simple_select("threads", "tid, fid, visible", "firstpost IN({$pidin}) AND firstpost != '{$masterpid}'");
while($thread = $db->fetch_array($query))

		// If the first post of a thread is merged out, the thread should be deleted
$query = $db->simple_select("threads", "tid, fid, visible", "firstpost IN({$pidin}) AND firstpost != '{$masterpid}'");
while($thread = $db->fetch_array($query))

		{

		{

			$this->delete_thread($thread['tid']);
// Subtract 1 thread from the forum's stats
if($thread['visible'])

			$this->delete_thread($thread['tid']);
// Subtract 1 thread from the forum's stats
if($thread['visible'])

Zeile 659Zeile 656
			foreach($thread_counters as $tid => $counters)
{
$db->update_query("threads", $counters, "tid='{$tid}'");

			foreach($thread_counters as $tid => $counters)
{
$db->update_query("threads", $counters, "tid='{$tid}'");





				update_thread_data($tid);

				update_thread_data($tid);

			}
}


			}
}


		update_thread_data($mastertid);

		update_thread_data($mastertid);

		

		

		update_forum_lastpost($fid);

		update_forum_lastpost($fid);

 
		
foreach($threads as $tid)
{
$count = array();
// Attachment count
$query = $db->query("
SELECT COUNT(aid) AS attachment_count
FROM ".TABLE_PREFIX."attachments a
LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid)
WHERE p.tid='$tid'
");
$count['attachmentcount'] = $db->fetch_field($query, "attachment_count");

if(!$count['attachmentcount'])
{
$count['attachmentcount'] = 0;
}

update_thread_counters($tid, $count);
}


if(is_array($forum_counters))
{


if(is_array($forum_counters))
{