function pathfilter_uninstall in Path Filter 7
Same name and namespace in other branches
- 5.2 pathfilter.install \pathfilter_uninstall()
- 5 pathfilter.install \pathfilter_uninstall()
- 6.2 pathfilter.install \pathfilter_uninstall()
- 6 pathfilter.install \pathfilter_uninstall()
Implements hook_uninstall().
File
- ./
pathfilter.install, line 22 - Provides install and uninstall functions for pathfilter.
Code
function pathfilter_uninstall() {
// Delete all pathfilter variables
db_delete('variable')
->condition('name', 'pathfilter_%%', 'LIKE')
->execute();
// Disable pathfilter from all formats
db_delete('filter')
->condition('module', 'pathfilter')
->execute();
// Remove internal and files from allowed protocols.
$allowed_protocols = array_flip(_pathfilter_allowed_protocol_helper());
unset($allowed_protocols['internal']);
unset($allowed_protocols['files']);
variable_set('filter_allowed_protocols', array_flip($allowed_protocols));
cache_clear_all('variables', 'cache');
watchdog('pathfilter', 'Path filter module removed');
}