Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: class_moderation.php 5523 2011-07-28 10:59:29Z Tomm $
| * $Id$
|
*/
class Moderation
| */
class Moderation
|
Zeile 237 | Zeile 237 |
---|
$db->delete_query("polls", "tid='$tid'"); $db->delete_query("pollvotes", "pid='".$thread['poll']."'"); $db->delete_query("threadsread", "tid='$tid'");
|
$db->delete_query("polls", "tid='$tid'"); $db->delete_query("pollvotes", "pid='".$thread['poll']."'"); $db->delete_query("threadsread", "tid='$tid'");
|
| $db->delete_query("threadratings", "tid='$tid'");
|
$updated_counters = array( "posts" => "-{$num_approved_posts}",
| $updated_counters = array( "posts" => "-{$num_approved_posts}",
|
Zeile 453 | Zeile 454 |
---|
{ global $db, $cache, $plugins;
|
{ global $db, $cache, $plugins;
|
$plugins->run_hooks_by_ref("class_moderation_delete_post_start", $pid);
| $pid = $plugins->run_hooks("class_moderation_delete_post_start", $pid);
|
// Get pid, uid, fid, tid, visibility, forum post count status of post $pid = intval($pid); $query = $db->query("
| // Get pid, uid, fid, tid, visibility, forum post count status of post $pid = intval($pid); $query = $db->query("
|
Zeile 605 | Zeile 606 |
---|
} } }
|
} } }
|
// Get lastpost pid to check if we're merging a post that is on the lastpost info $query = $db->simple_select("posts", "pid", "tid = '{$post['tid']}'", array('order_by' => 'dateline', 'order_dir' => 'desc', 'limit' => '1')); $lastpostpid = $db->fetch_field($query, 'pid');
| |
$query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND visible='1'"); $attachment_count = $db->fetch_field($query2, "count");
| $query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND visible='1'"); $attachment_count = $db->fetch_field($query2, "count");
|
Zeile 765 | Zeile 762 |
---|
"replies" => 0, "closed" => "moved|$tid", "sticky" => $thread['sticky'],
|
"replies" => 0, "closed" => "moved|$tid", "sticky" => $thread['sticky'],
|
"visible" => $thread['visible'],
| "visible" => intval($thread['visible']),
|
"notes" => '' ); $redirect_tid = $db->insert_query("threads", $threadarray);
| "notes" => '' ); $redirect_tid = $db->insert_query("threads", $threadarray);
|
Zeile 798 | Zeile 795 |
---|
"replies" => $thread['replies'], "closed" => $thread['closed'], "sticky" => $thread['sticky'],
|
"replies" => $thread['replies'], "closed" => $thread['closed'], "sticky" => $thread['sticky'],
|
"visible" => $thread['visible'],
| "visible" => intval($thread['visible']),
|
"unapprovedposts" => $thread['unapprovedposts'], "attachmentcount" => $thread['attachmentcount'], "prefix" => $thread['prefix'],
| "unapprovedposts" => $thread['unapprovedposts'], "attachmentcount" => $thread['attachmentcount'], "prefix" => $thread['prefix'],
|
Zeile 904 | Zeile 901 |
---|
{ $attachment_array = array( 'pid' => $pid,
|
{ $attachment_array = array( 'pid' => $pid,
|
'posthash' => $db->escape_string($attachment['posthash']),
| |
'uid' => $attachment['uid'], 'filename' => $db->escape_string($attachment['filename']), 'filetype' => $attachment['filetype'],
| 'uid' => $attachment['uid'], 'filename' => $db->escape_string($attachment['filename']), 'filetype' => $attachment['filetype'],
|
Zeile 1199 | Zeile 1195 |
---|
{ $updated_stats = array( "unapprovedposts" => '-'.($mergethread['replies']+1+$mergethread['unapprovedposts'])
|
{ $updated_stats = array( "unapprovedposts" => '-'.($mergethread['replies']+1+$mergethread['unapprovedposts'])
|
); }
| ); }
|
else { $updated_stats = array(
| else { $updated_stats = array(
|
Zeile 1273 | Zeile 1269 |
---|
"lastpost" => intval($thread['lastpost']), "lastposter" => $db->escape_string($thread['lastposter']), "replies" => count($pids)-1,
|
"lastpost" => intval($thread['lastpost']), "lastposter" => $db->escape_string($thread['lastposter']), "replies" => count($pids)-1,
|
"visible" => $visible,
| "visible" => intval($visible),
|
"notes" => '' ); $newtid = $db->insert_query("threads", $query);
| "notes" => '' ); $newtid = $db->insert_query("threads", $query);
|
Zeile 1397 | Zeile 1393 |
---|
{ $forum_counters[$post['fid']]['unapprovedposts'] = $forum_cache[$post['fid']]['unapprovedposts']; }
|
{ $forum_counters[$post['fid']]['unapprovedposts'] = $forum_cache[$post['fid']]['unapprovedposts']; }
|
--$forum_counters[$post['fid']]['posts'];
| --$forum_counters[$post['fid']]['unapprovedposts'];
|
// Add 1 to the new forum's unapproved posts if(!isset($forum_counters[$moveto]['unapprovedposts'])) {
| // Add 1 to the new forum's unapproved posts if(!isset($forum_counters[$moveto]['unapprovedposts'])) {
|
Zeile 1545 | Zeile 1541 |
---|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid = '{$thread['tid']}'
|
FROM ".TABLE_PREFIX."posts p LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=p.uid) WHERE p.tid = '{$thread['tid']}'
|
GROUP BY u.uid
| GROUP BY p.visible, u.uid
|
ORDER BY posts DESC "); while($posters = $db->fetch_array($query1))
| ORDER BY posts DESC "); while($posters = $db->fetch_array($query1))
|
Zeile 2135 | Zeile 2131 |
---|
$tids = array_map('intval', $tids); $tids_csv = implode(',', $tids);
|
$tids = array_map('intval', $tids); $tids_csv = implode(',', $tids);
|
$update_thread = array('prefix' => $prefix);
| $update_thread = array('prefix' => intval($prefix));
|
$db->update_query('threads', $update_thread, "tid IN ({$tids_csv})"); $arguments = array('tids' => $tids, 'prefix' => $prefix);
| $db->update_query('threads', $update_thread, "tid IN ({$tids_csv})"); $arguments = array('tids' => $tids, 'prefix' => $prefix);
|