elf.install in External Links Filter 6.3
Same filename and directory in other branches
Installation and uninstallation functions.
File
elf.installView source
<?php
/**
* @file
* Installation and uninstallation functions.
*/
/**
* Implementation of hook_uninstall().
*/
function elf_uninstall() {
db_query("DELETE FROM {variable} WHERE name LIKE 'elf_%%'");
cache_clear_all('variables', 'cache');
}
/**
* Implementation of hook_requirements().
*/
function elf_requirements($phase) {
$requirements = array();
$loaded = extension_loaded('DOM');
$requirements["elf_extension_dom"] = array(
'title' => 'DOM',
'value' => $loaded ? t('Loaded') : t('Not loaded'),
'severity' => $loaded ? REQUIREMENT_OK : REQUIREMENT_ERROR,
'description' => $loaded ? NULL : t('External Links Filter requires PHP\'s <a href="!url">Document Object Model</a>.', array(
'!url' => 'http://php.net/manual/en/book.dom.php',
)),
);
return $requirements;
}
Functions
Name![]() |
Description |
---|---|
elf_requirements | Implementation of hook_requirements(). |
elf_uninstall | Implementation of hook_uninstall(). |