/**
  * Moves the threads with the given thread ids into the recycle bin.
  */
 public static function trashAll($threadIDs, $trashPosts = true, $reason = '')
 {
     if (empty($threadIDs)) {
         return;
     }
     // trash thread
     $sql = "UPDATE \twbb" . WBB_N . "_thread\n\t\t\tSET\tisDeleted = 1,\n\t\t\t\tdeleteTime = " . TIME_NOW . ",\n\t\t\t\tdeletedBy = '" . escapeString(WCF::getUser()->username) . "',\n\t\t\t\tdeletedByID = " . WCF::getUser()->userID . ",\n\t\t\t\tdeleteReason = '" . escapeString($reason) . "',\n\t\t\t\tisDisabled = 0\n\t\t\tWHERE \tthreadID IN (" . $threadIDs . ")";
     WCF::getDB()->sendQuery($sql);
     // trash post
     if ($trashPosts) {
         PostEditor::trashAll(self::getAllPostIDs($threadIDs), $reason);
     }
 }