freelinking.install in Freelinking 6.3
Same filename and directory in other branches
Install, update and uninstall functions for the freelinking module.
File
freelinking.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the freelinking module.
*/
/**
* Implements hook_update_N().
*
* Check that plugin freelinking_path.inc has been deleted.
*/
function freelinking_update_6001() {
// Nothing here.
}
/**
* Implements hook_update_N().
*
* Input formats using Freelinking filters should not be cached.
*/
function freelinking_update_6000() {
db_query("UPDATE {filter_formats} SET cache=0 WHERE format IN (SELECT format FROM {filters} WHERE module='%s')", array(
'freelinking',
));
}
/**
* Implements hook_requirements().
*/
function freelinking_requirements($phase) {
$requirements = array();
if ('runtime' == $phase) {
$removed = !file_exists(drupal_get_path('module', 'freelinking') . '/plugins/freelinking_path.inc');
$sevr = $removed ? REQUIREMENT_OK : REQUIREMENT_ERROR;
$t = get_t();
$requirements['freelinking'] = array(
'title' => $t('Freelinking'),
'value' => 'Enabled',
'description' => $t('Please make sure that the file "freelinking_path.inc" is removed from the "plugins" directory.'),
'severity' => $sevr,
);
}
return $requirements;
}
Functions
Name | Description |
---|---|
freelinking_requirements | Implements hook_requirements(). |
freelinking_update_6000 | Implements hook_update_N(). |
freelinking_update_6001 | Implements hook_update_N(). |