| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: seo_checker.install,v 1.1.2.1 2009/03/25 13:00:56 miruoss Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 12 |
function seo_checker_install() { |
function seo_checker_install() { |
| 13 |
variable_set('jquery_update_compression_type', 'none'); |
variable_set('jquery_update_compression_type', 'none'); |
| 14 |
} |
} |
| 15 |
|
|
| 16 |
|
/** |
| 17 |
|
* Implementation of hook_uninstall(). |
| 18 |
|
*/ |
| 19 |
|
function seo_checker_uninstall() { |
| 20 |
|
/* delete variables for types */ |
| 21 |
|
$types = node_get_types(); |
| 22 |
|
foreach ($types as $type) { |
| 23 |
|
variable_del('seo_checker_'. $type->type); |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
variable_del('seo_checker_allow_failures'); |
| 27 |
|
} |
| 28 |
|
|
| 29 |
|
/** |
| 30 |
|
* This function should be called by modules that implement SEO rules |
| 31 |
|
* when they are uninstalled. It cleans up their variables. |
| 32 |
|
* @param string $module |
| 33 |
|
* The name of the submodule. |
| 34 |
|
*/ |
| 35 |
|
function seo_checker_submodule_uninstall($modulename) { |
| 36 |
|
/* delete variables holding thresholds */ |
| 37 |
|
$rules = module_invoke($modulename, 'register_seo_rules'); |
| 38 |
|
foreach ($rules as $rid => $rule) { |
| 39 |
|
variable_del('seo_threshold_'. $rid); |
| 40 |
|
} |
| 41 |
|
} |