removeTopics

Description

Removes the topics specified.

Syntax

void removeTopics (mixed $topics[, bool $decreasePostCount[, bool $ignoreRecycling]])



Parameter $topics

Expected type: Mixed
Description: An integer or array of integers corresponding to the IDs of the topics that should be deleted

Allowed types for $topics
Allowed values Description
Integer The ID of a single topic to delete
Array of Integers An array of one or more topic IDs for topics that should be deleted



Parameter $decreasePostCount

Expected type: Boolean
Description: Whether or not to decrease post counts (default is true)



Parameter $ignoreRecycling

Expected type: Boolean
Description: Whether or not to ignore recycling settings (if true, all of the specified topics will be completely deleted, even if you have a recycling bin board, and even if the topics are already in the recycling bin).


Notes

  • Does not check permissions
  • Called from other functions within SMF
  • Can be used to create a custom auto-pruning script (see http://www.simplemachines.org/community/index.php?topic=19377.0)
  • Decreases users' post counts unless $decreasePostCounts is false
  • Respects recycling settings unless $ignoreRecycling is true
Advertisement: