Vergleich inc/class_moderation.php - 1.8.8 - 1.8.21

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 323Zeile 323
		// Update forum count
update_forum_counters($thread['fid'], $updated_counters);
update_forum_lastpost($thread['fid']);

		// Update forum count
update_forum_counters($thread['fid'], $updated_counters);
update_forum_lastpost($thread['fid']);

 
		mark_reports($tid, 'thread');


$plugins->run_hooks("class_moderation_delete_thread", $tid);



$plugins->run_hooks("class_moderation_delete_thread", $tid);


Zeile 754Zeile 755
	 * @param int $tid Thread ID (Set to 0 if posts from multiple threads are selected)
* @return int ID of the post into which all other posts are merged
*/

	 * @param int $tid Thread ID (Set to 0 if posts from multiple threads are selected)
* @return int ID of the post into which all other posts are merged
*/

	function merge_posts($pids, $tid=0, $sep="new_line")

	function merge_posts($pids=array(), $tid=0, $sep="new_line")

	{
global $db, $plugins;


	{
global $db, $plugins;


Zeile 1566Zeile 1567
		if($new_firstpost['pid'] != $thread['firstpost'])
{
update_first_post($thread['tid']);

		if($new_firstpost['pid'] != $thread['firstpost'])
{
update_first_post($thread['tid']);

		}

// Subtract merged thread from user counter
if($mergethread['visible'] == 1 && $forum_cache[$mergethread['fid']]['usethreadcounts'] == 1)
{
if(!isset($user_posts[$mergethread['uid']]['threadnum']))
{
$user_posts[$mergethread['uid']]['threadnum'] = 0;
}
--$user_posts[$mergethread['uid']]['threadnum'];

 
		}

// Update thread count if thread has a new firstpost and is visible

		}

// Update thread count if thread has a new firstpost and is visible

Zeile 1752Zeile 1743
				"threadnum" => "+{$counters['threadnum']}",
);
update_user_counters($uid, $update_array);

				"threadnum" => "+{$counters['threadnum']}",
);
update_user_counters($uid, $update_array);

		}

		}


$updated_stats = array(
"replies" => "+{$mergethread['replies']}",


$updated_stats = array(
"replies" => "+{$mergethread['replies']}",

Zeile 1842Zeile 1833
			{
++$forum_counters[$moveto]['threads'];
if(!isset($user_counters[$newthread['uid']]))

			{
++$forum_counters[$moveto]['threads'];
if(!isset($user_counters[$newthread['uid']]))

				{

				{

					$user_counters[$newthread['uid']] = array(
'postnum' => 0,
'threadnum' => 0
);
}

					$user_counters[$newthread['uid']] = array(
'postnum' => 0,
'threadnum' => 0
);
}

				// Subtract thread from old thread opener
--$user_counters[$newthread['uid']]['threadnum'];
}

				++$user_counters[$newthread['uid']]['threadnum'];
}


			elseif($visible == -1)
{
++$forum_counters[$moveto]['deletedthreads'];
}
else

			elseif($visible == -1)
{
++$forum_counters[$moveto]['deletedthreads'];
}
else

			{

			{

				// Unapproved thread?
++$forum_counters[$moveto]['unapprovedthreads'];
}

				// Unapproved thread?
++$forum_counters[$moveto]['unapprovedthreads'];
}

Zeile 1867Zeile 1857
			if(!$newthread)
{
return false;

			if(!$newthread)
{
return false;

			}

			}

			$moveto = $newthread['fid'];
}


			$moveto = $newthread['fid'];
}


Zeile 1934Zeile 1924

// Subtract 1 from the old thread's replies
--$thread_counters[$post['tid']]['replies'];


// Subtract 1 from the old thread's replies
--$thread_counters[$post['tid']]['replies'];

			}

			}

			elseif($post['visible'] == 0)
{
// Unapproved post

			elseif($post['visible'] == 0)
{
// Unapproved post

Zeile 2204Zeile 2194
				foreach($counters as $key => $counter)
{
if($counter >= 0)

				foreach($counters as $key => $counter)
{
if($counter >= 0)

					{

					{

						$counters[$key] = "+{$counter}";
}
}

						$counters[$key] = "+{$counter}";
}
}

Zeile 2249Zeile 2239
			$forum = get_forum($thread['fid']);

if(!isset($forum_counters[$thread['fid']]))

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

if(!isset($forum_counters[$thread['fid']]))

			{

			{

				$forum_counters[$thread['fid']] = array(
'posts' => 0,
'threads' => 0,

				$forum_counters[$thread['fid']] = array(
'posts' => 0,
'threads' => 0,

Zeile 2260Zeile 2250
				);
}


				);
}


			if(!isset($user_counters[$thread['uid']]['num_threads']))

			if(!isset($user_counters[$thread['uid']]))

			{

			{

				$user_counters[$thread['uid']]['num_threads'] = 0;




				$user_counters[$thread['uid']] = array(
'num_posts' => 0,
'num_threads' => 0
);

			}

if($thread['visible'] == 1)

			}

if($thread['visible'] == 1)

Zeile 2296Zeile 2289
				");
while($posters = $db->fetch_array($query1))
{

				");
while($posters = $db->fetch_array($query1))
{

					if(!isset($user_counters[$posters['uid']]['num_posts']))

					if(!isset($user_counters[$posters['uid']]))

					{

					{

						$user_counters[$posters['uid']]['num_posts'] = 0;




						$user_counters[$posters['uid']] = array(
'num_posts' => 0,
'num_threads' => 0
);

					}

if($newforum['usepostcounts'] != 0 && $forum['usepostcounts'] == 0)

					}

if($newforum['usepostcounts'] != 0 && $forum['usepostcounts'] == 0)