Vergleich admin/moderate.php - 1.2.7 - 1.2.13

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

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

 * $Id: moderate.php 3004 2007-04-11 04:23:20Z Tikitiki $

 * $Id: moderate.php 3399 2007-10-22 06:07:30Z Tikitiki $

 */

define("IN_MYBB", 1);

 */

define("IN_MYBB", 1);

Zeile 76Zeile 76

if($mybb->input['action'] == "do_threads" || $mybb->input['action'] == "do_posts" || $mybb->input['action'] == "do_threadsposts")
{


if($mybb->input['action'] == "do_threads" || $mybb->input['action'] == "do_posts" || $mybb->input['action'] == "do_threadsposts")
{

 
	$forum_cache = $cache->read("forums");


	$plugins->run_hooks("admin_moderate_do_threadsposts");
if(is_array($mybb->input['threadvalidate']) && $mybb->input['action'] != "do_posts")
{
foreach($mybb->input['threadvalidate'] as $tid => $val)
{
$tid = intval($tid);

	$plugins->run_hooks("admin_moderate_do_threadsposts");
if(is_array($mybb->input['threadvalidate']) && $mybb->input['action'] != "do_posts")
{
foreach($mybb->input['threadvalidate'] as $tid => $val)
{
$tid = intval($tid);

			$query = $db->simple_select(TABLE_PREFIX."threads", "subject, fid", "tid='$tid'");

			$query = $db->simple_select(TABLE_PREFIX."threads", "subject, fid, dateline, uid", "tid='$tid'");

			$thread = $db->fetch_array($query);
if($mybb->input['threaddelete'][$tid] == "yes")
{
delete_thread($tid);

			$thread = $db->fetch_array($query);
if($mybb->input['threaddelete'][$tid] == "yes")
{
delete_thread($tid);

			}
else
{
if($val != "no")
{

			}
else
{
if($val != "no")
{

					$subject = $db->escape_string($mybb->input['threadsubject'][$tid]);
$message = $db->escape_string($mybb->input['threadmessage'][$tid]);

$db->query("UPDATE ".TABLE_PREFIX."threads SET visible='1', subject='{$subject}', unapprovedposts=unapprovedposts-1 WHERE tid = '".$tid."'");

					$subject = $db->escape_string($mybb->input['threadsubject'][$tid]);
$message = $db->escape_string($mybb->input['threadmessage'][$tid]);

$db->query("UPDATE ".TABLE_PREFIX."threads SET visible='1', subject='{$subject}', unapprovedposts=unapprovedposts-1 WHERE tid = '".$tid."'");

 

$forum = $forum_cache[$thread['fid']];
if($forum['usepostcounts'] != "no")
{
$queryadd = ",postnum=postnum+1";
}
else
{
$queryadd = '';
}
$db->query("UPDATE ".TABLE_PREFIX."users SET lastpost='{$thread['dateline']}' {$queryadd} WHERE uid='{$thread['uid']}'");
$done_firstposts[$thread['firstpost']] = 1;


					
$sql_array = array(
"message" => $message,

					
$sql_array = array(
"message" => $message,

Zeile 116Zeile 131
		foreach($mybb->input['postvalidate'] as $pid => $val)
{
$pid = intval($pid);

		foreach($mybb->input['postvalidate'] as $pid => $val)
{
$pid = intval($pid);

			$query = $db->simple_select(TABLE_PREFIX."posts", "tid", "pid='$pid'");

			$query = $db->simple_select(TABLE_PREFIX."posts", "tid, uid, dateline", "pid='$pid'");

			$post = $db->fetch_array($query);
$query = $db->simple_select(TABLE_PREFIX."threads", "fid", "tid='$post[tid]'");
$thread = $db->fetch_array($query);

			$post = $db->fetch_array($query);
$query = $db->simple_select(TABLE_PREFIX."threads", "fid", "tid='$post[tid]'");
$thread = $db->fetch_array($query);

Zeile 137Zeile 152
						"subject" => $subject
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "pid = '".$pid."'");

						"subject" => $subject
);
$db->update_query(TABLE_PREFIX."posts", $sql_array, "pid = '".$pid."'");

 


$forum = $forum_cache[$thread['fid']];
if(!$done_firstposts[$post['pid']])
{
if($forum['usepostcounts'] != "no")
{
$queryadd = ",postnum=postnum+1";
}
else
{
$queryadd = '';
}
$db->query("UPDATE ".TABLE_PREFIX."users SET lastpost='{$post['dateline']}' {$queryadd} WHERE uid='{$post['uid']}'");
}


// Update unapproved thread count
$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1, replies=replies+1 WHERE tid='$post[tid]'");


// Update unapproved thread count
$db->query("UPDATE ".TABLE_PREFIX."threads SET unapprovedposts=unapprovedposts-1, replies=replies+1 WHERE tid='$post[tid]'");

Zeile 210Zeile 240
	$done = 0;

$query = $db->query("

	$done = 0;

$query = $db->query("

		SELECT t.tid, t.fid, t.subject, p.message AS postmessage, p.pid AS postpid, f.name AS forumname, u.username AS username
FROM (".TABLE_PREFIX."threads t, ".TABLE_PREFIX."posts p)


		SELECT t.tid, t.fid, t.subject, p.message AS postmessage, p.pid AS postpid, f.name AS forumname, u.username AS username, u.uid
FROM ".TABLE_PREFIX."threads t
LEFT JOIN ".TABLE_PREFIX."posts p ON (p.tid=t.tid)

		LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)

		LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=t.uid)

		WHERE t.visible='0' AND p.tid=t.tid

		WHERE t.visible='0'

		ORDER BY t.lastpost DESC
");
$tcount = $db->num_rows($query);

		ORDER BY t.lastpost DESC
");
$tcount = $db->num_rows($query);

Zeile 265Zeile 296
		"order_dir" => "DESC"
);
$query = $db->query("

		"order_dir" => "DESC"
);
$query = $db->query("

		SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, f.name AS forumname, u.username AS username

		SELECT p.pid, p.subject, p.message, t.subject AS threadsubject, t.tid, f.name AS forumname, u.username AS username, u.uid

		FROM  ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)

		FROM  ".TABLE_PREFIX."posts p
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid)
LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid)