Vergleich inc/class_moderation.php - 1.2.0 - 1.2.1

  Keine Änderungen   Hinzugefügt   Modifiziert   Entfernt
Zeile 6Zeile 6
 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * Website: http://www.mybboard.com
* License: http://www.mybboard.com/eula.html
*

 * $Id: class_moderation.php 2063 2006-08-12 08:12:26Z chris $

 * $Id: class_moderation.php 2228 2006-09-17 19:49:10Z Tikitiki $

 */

class Moderation

 */

class Moderation

Zeile 334Zeile 334
		// Update unapproved post count
if($post['visible'] == 0)
{

		// Update unapproved post count
if($post['visible'] == 0)
{

			$db->query("UPDATE ".TABLE_PREFIX."forums SET unapprovedposts=unapprovedposts-1 WHERE fid='$post[fid]'");
$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1 WHERE tid='$post[tid]'");

			$db->query("UPDATE ".TABLE_PREFIX."forums SET unapprovedposts=unapprovedposts-1 WHERE fid='{$post['fid']}'");
$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1 WHERE tid='{$post['tid']}'");

		}
$plugins->run_hooks("delete_post", $post['tid']);
$cache->updatestats();

		}
$plugins->run_hooks("delete_post", $post['tid']);
$cache->updatestats();

Zeile 374Zeile 374
			{ // these are the selected posts
if($sep == "new_line")
{

			{ // these are the selected posts
if($sep == "new_line")
{

					$message .= "\n\n $post[message]";

					$message .= "\n\n {$post['message']}";

				}
else
{

				}
else
{

					$message .= "[hr]$post[message]";

					$message .= "[hr]{$post['message']}";

				}

				}

 
				$db->query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum-1 WHERE uid='{$post['uid']}'");

			}
}


			}
}


Zeile 488Zeile 489
						$postssql .= ", ";
}
$post['message'] = $db->escape_string($post['message']);

						$postssql .= ", ";
}
$post['message'] = $db->escape_string($post['message']);

					$postssql .= "('$newtid','$new_fid','$post[subject]','$post[icon]','$post[uid]','$post[username]','$post[dateline]','$post[message]','$post[ipaddress]','$post[includesig]','$post[smilieoff]','$post[edituid]','$post[edittime]','$post[visible]')";

					$postssql .= "('$newtid','$new_fid','{$post['subject']}','{$post['icon']}','{$post['uid']}','{$post['username']}','{$post['dateline']}','{$post['message']}','{$post['ipaddress']}','{$post['includesig']}','{$post['smilieoff']}','{$post['edituid']}','{$post['edittime']}','{$post['visible']}')";

				}
$db->query("INSERT INTO ".TABLE_PREFIX."posts (tid,fid,subject,icon,uid,username,dateline,message,ipaddress,includesig,smilieoff,edituid,edittime,visible) VALUES $postssql");


				}
$db->query("INSERT INTO ".TABLE_PREFIX."posts (tid,fid,subject,icon,uid,username,dateline,message,ipaddress,includesig,smilieoff,edituid,edittime,visible) VALUES $postssql");


Zeile 522Zeile 523
		{
if($method == "copy" && $newforum['usepostcounts'] != "no")
{

		{
if($method == "copy" && $newforum['usepostcounts'] != "no")
{

				$pcount = "+$posters[posts]";

				$pcount = "+{$posters['posts']}";

			}
elseif($method != "copy" && ($newforum['usepostcounts'] != "no" && $forum['usepostcounts'] == "no"))
{

			}
elseif($method != "copy" && ($newforum['usepostcounts'] != "no" && $forum['usepostcounts'] == "no"))
{

				$pcount = "+$posters[posts]";

				$pcount = "+{$posters['posts']}";

			}
elseif($method != "copy" && ($newforum['usepostcounts'] == "no" && $forum['usepostcounts'] != "no"))
{

			}
elseif($method != "copy" && ($newforum['usepostcounts'] == "no" && $forum['usepostcounts'] != "no"))
{

				$pcount = "-$posters[posts]";

				$pcount = "-{$posters['posts']}";

			}
if(!empty($pcount))
{

			}
if(!empty($pcount))
{

				$db->query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum$pcount WHERE uid='$posters[uid]'");

				$db->query("UPDATE ".TABLE_PREFIX."users SET postnum=postnum$pcount WHERE uid='{$posters['uid']}'");

			}
}


			}
}


Zeile 582Zeile 583
		$pollsql = '';
if($mergethread['poll'])
{

		$pollsql = '';
if($mergethread['poll'])
{

			$pollsql = ", poll='$mergethread[poll]'";

			$pollsql = ", poll='{$mergethread['poll']}'";

			$sqlarray = array(
"tid" => $tid,
);

			$sqlarray = array(
"tid" => $tid,
);

Zeile 686Zeile 687
			SELECT COUNT(p.pid) AS posts, u.uid 
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)

			SELECT COUNT(p.pid) AS posts, u.uid 
FROM ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid)

			WHERE p.tid='$tid' 

			WHERE p.tid='$newtid' 

			GROUP BY u.uid 
ORDER BY posts DESC
");

			GROUP BY u.uid 
ORDER BY posts DESC
");

Zeile 694Zeile 695
		{
if($oldusepcounts == "yes" && $newusepcounts == "no")
{

		{
if($oldusepcounts == "yes" && $newusepcounts == "no")
{

				$pcount = "-$posters[posts]";

				$pcount = "-{$posters['posts']}";

			}
elseif($oldusepcounts == "no" && $newusepcounts == "yes")
{

			}
elseif($oldusepcounts == "no" && $newusepcounts == "yes")
{

				$pcount = "+$posters[posts]";

				$pcount = "+{$posters['posts']}";

			}

if(!empty($pcount))

			}

if(!empty($pcount))

Zeile 714Zeile 715
			"subject" => $newsubject,
"replyto" => 0
);

			"subject" => $newsubject,
"replyto" => 0
);

		$db->update_query(TABLE_PREFIX."posts", $sqlarray, "pid='$newthread[pid]'");

		$db->update_query(TABLE_PREFIX."posts", $sqlarray, "pid='{$newthread['pid']}'");


// Update the subject of the first post in the old thread
$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'", array('order_by' => 'dateline', 'limit' => 1));


// Update the subject of the first post in the old thread
$query = $db->simple_select(TABLE_PREFIX."posts", "pid", "tid='$tid'", array('order_by' => 'dateline', 'limit' => 1));