コード例 #1
0
ファイル: forum.worker.php プロジェクト: TheDoxMedia/pgs
 private function delete_thread($thread_id)
 {
     if (isset($thread_id)) {
         // Verify thread first
         $thread_data = thread::get($thread_id);
         if ($this->user['SiteRank'] >= 4 && $thread_data != null && $this->user['BanStatus'] == 0) {
             $return = thread::delete($thread_id);
             json::resp(array('success' => true, 'threadDeleted' => (int) $return['threadDeleted'], 'postsDeleted' => (int) $return['postsDeleted'], 'cat' => $thread_data['category']));
         } else {
             self::errorJSON('User does not have proper permissions to delete threads.');
         }
     }
 }