File/cms/include/delete.inc.php

Description
Functions
deleteCheck (line 187)

Check if it is safe to delete node.

In order to be able to delete a node from a tree, there shouldn't be any other records referencing to it. This function checks this for this these types of references. So it checks to see if it's safe to delete this node. TRUE -> safe, FALSE -> not safe.

boolean deleteCheck (mixed $parentID, integer $patternID)
  • integer $patternID: The word's pattern ID
deletePatternElement (line 122)

Delete the word from the Pattern Table.

Remove the record from the pattern table using it's unique ID.

void deletePatternElement (integer $patternID)
  • integer $patternID: The word's pattern ID
deleteTemplate (line 142)

Delete the template from the Template Table.

Delete the template record with a particular ID.

void deleteTemplate (integer $templateID)
  • integer $templateID: The category's ID
delete_category (line 49)

Delete a category using template ID

This is the container function for a set of other functions for the deletion of a category. It will travel the AIML tree backwards checking if a word-node is used by other categories, if not then deletes it and travels onward to the next word-node. If it it is used, then breaks of the routine, it has then accomplised what it needed to do.

void delete_category (integer $templateID, integer $botid)
  • integer $templateID: The template's ID
  • integer $botid: The bot's ID.
findprevioustemplate (line 219)

Retrieve the previous category's reference to the template Table.

Categories are put in the database in sequence with the last record being the reference to the template table. Thus a category (roughly) would exist from template reference to template reference.

integer findprevioustemplate (integer $templateID)
  • integer $templateID: The category's ID
updateGmcache (line 166)

Disable record in GMcache table.

The GMcache is used to speed up the bot's response time, by checking the cache first before waking the AIML tree. But also means that if a category is deleted, all Cached references need to be deleted or edited too. Currently the records are edited, the Combined contents is replaced by REMOVED and the template ID is replaced by 0

void updateGmcache (integer $templateID)
  • integer $templateID: The category's ID

Documentation generated on Tue, 11 Jan 2005 18:41:03 +0100 by phpDocumentor 1.3.0RC3