Exemplo n.º 1
0
     }
 }
 // report
 if ($vbulletin->GPC['report'] and !empty($vbulletin->options['vb_antispam_key'])) {
     // report to Akismet
     require_once DIR . '/includes/class_akismet.php';
     $akismet = new vB_Akismet($vbulletin);
     $akismet->akismet_board = $vbulletin->options['bburl'];
     $akismet->akismet_key = $vbulletin->options['vb_antispam_key'];
     if ($vbulletin->GPC['type'] == 'thread') {
         $posts = $db->query_read("\n\t\t\t\tSELECT post.*, postlog.*\n\t\t\t\tFROM " . TABLE_PREFIX . "thread AS thread\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "post AS post ON (post.postid = thread.firstpostid)\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "postlog AS postlog ON (postlog.postid = post.postid)\n\t\t\t\tWHERE thread.threadid IN (" . implode(',', $threadids) . ")\n\t\t\t");
     } else {
         $posts = $db->query_read("\n\t\t\t\tSELECT post.*, postlog.*\n\t\t\t\tFROM " . TABLE_PREFIX . "post AS post\n\t\t\t\tINNER JOIN " . TABLE_PREFIX . "postlog AS postlog ON (postlog.postid = post.postid)\n\t\t\t\tWHERE post.postid IN (" . implode(',', $postids) . ")\n\t\t\t");
     }
     while ($post = $db->fetch_array($posts)) {
         $akismet->mark_as_spam(array('user_ip' => long2ip($post['ip']), 'user_agent' => $post['useragent'], 'comment_type' => 'post', 'comment_author' => $post['username'], 'comment_content' => $post['pagetext']));
     }
 }
 // delete threads that are defined explicitly as spam by being ticked
 $physicaldel = $vbulletin->GPC['deletetype'] == 2 ? true : false;
 $skipped_user_prune = array();
 if ($vbulletin->GPC['deleteother'] and !empty($user_cache) and can_moderate(-1, 'canmassprune')) {
     $remove_all_posts = array();
     $user_checks = $db->query_read_slave("SELECT COUNT(*) AS total, userid AS userid FROM " . TABLE_PREFIX . "post WHERE userid IN (" . implode(', ', array_keys($user_cache)) . ") GROUP BY userid");
     while ($user_check = $db->fetch_array($user_checks)) {
         if (intval($user_check['total']) <= 50) {
             $remove_all_posts[] = $user_check['userid'];
         } else {
             $skipped_user_prune[] = $user_check['userid'];
         }
     }