| 1 |
<?php
|
| 2 |
// $Id: sphinxsearch.install,v 1.1.2.4 2008/08/29 19:08:31 markuspetrux Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* @file
|
| 6 |
* Module installation/uninstallation hooks.
|
| 7 |
*/
|
| 8 |
|
| 9 |
/**
|
| 10 |
* Implementation of hook_uninstall().
|
| 11 |
*/
|
| 12 |
function sphinxsearch_uninstall() {
|
| 13 |
// Delete all module variables and then clear the variable cache.
|
| 14 |
db_query("DELETE FROM {variable} WHERE name LIKE 'sphinxsearch\_%'");
|
| 15 |
cache_clear_all('variables', 'cache');
|
| 16 |
}
|
| 17 |
|
| 18 |
/**
|
| 19 |
* Changed variable names related to tagadelic alike blocks.
|
| 20 |
*/
|
| 21 |
function sphinxsearch_update_1() {
|
| 22 |
require_once(drupal_get_path('module', 'sphinxsearch') .'/sphinxsearch.taxonomy.inc');
|
| 23 |
|
| 24 |
foreach (array_keys(sphinxsearch_get_enabled_vocabularies()) as $vid) {
|
| 25 |
foreach (array('sortmode', 'tags', 'levels') as $variable) {
|
| 26 |
$value = variable_get('sphinxsearch_tagadelic_block_'. $variable .'_'. $vid, NULL);
|
| 27 |
if (isset($value)) {
|
| 28 |
variable_set('sphinxsearch_block_tagadelic_'. $variable .'_'. $vid, $value);
|
| 29 |
variable_del('sphinxsearch_tagadelic_block_'. $variable .'_'. $vid);
|
| 30 |
}
|
| 31 |
}
|
| 32 |
}
|
| 33 |
return array();
|
| 34 |
}
|
| 35 |
|
| 36 |
/**
|
| 37 |
* Removed Sphinx document ids offset option.
|
| 38 |
*/
|
| 39 |
function sphinxsearch_update_2() {
|
| 40 |
variable_del('sphinxsearch_docid_offset');
|
| 41 |
return array();
|
| 42 |
}
|