/**
  * Deletes a thread with the first post
  *
  * @param	boolean	Whether to consider updating post counts, regardless of forum's settings
  * @param	boolean	Whether to physically remove the thread from the database
  * @param	array	Array of information for a soft delete
  * @param	boolean	Whether to add an entry to the moderator log
  *
  * @return	mixed	The number of affected rows
  */
 function delete($countposts = true, $physicaldel = true, $delinfo = NULL, $dolog = true)
 {
     ($hook = vBulletinHook::fetch_hook('threadfpdata_delete')) ? eval($hook) : false;
     return parent::delete($countposts, $physicaldel, $delinfo, $this->info['skip_moderator_log'] !== null ? !$this->info['skip_moderator_log'] : $dolog);
 }
Example #2
0
 /**
  * Deletes a thread with the first post
  *
  * @param	boolean	Whether to consider updating post counts, regardless of forum's settings
  * @param	boolean	Whether to physically remove the thread from the database
  * @param	array	Array of information for a soft delete
  * @param	boolean	Whether to add an entry to the moderator log
  *
  * @return	mixed	The number of affected rows
  */
 function delete($countposts = true, $physicaldel = true, $delinfo = NULL, $dolog = true)
 {
     require_once DIR . '/vb/search/core.php';
     // TODO: follow up on and check $this->existing['threadid']
     if ($threadid = $this->existing['threadid']) {
         // Search index maintenance
         if ($physicaldel) {
             require_once DIR . '/vb/search/indexcontroller/queue.php';
             vb_Search_Indexcontroller_Queue::indexQueue('vBForum', 'Post', 'delete', $threadid);
             require_once DIR . '/includes/class_taggablecontent.php';
             $content = vB_Taggable_Content_Item::create($this->registry, "vBForum_Thread", $threadid);
             $content->delete_tag_attachments();
         }
     }
     ($hook = vBulletinHook::fetch_hook('threadfpdata_delete')) ? eval($hook) : false;
     return parent::delete($countposts, $physicaldel, $delinfo, $this->info['skip_moderator_log'] !== null ? !$this->info['skip_moderator_log'] : $dolog);
 }