| 1 |
<?php |
<?php |
| 2 |
// $Id$ |
// $Id: og_reg_keys.install,v 1.2 2008/11/26 19:42:21 marcp Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* Definition of hook_schema(); |
* Definition of hook_schema(); |
| 28 |
'indexes' => array( |
'indexes' => array( |
| 29 |
'code' => array('code'), |
'code' => array('code'), |
| 30 |
), |
), |
| 31 |
); |
); |
| 32 |
|
|
| 33 |
return $schema; |
return $schema; |
| 34 |
} |
} |
| 40 |
|
|
| 41 |
function og_reg_keys_uninstall() { |
function og_reg_keys_uninstall() { |
| 42 |
drupal_uninstall_schema('og_reg_keys'); |
drupal_uninstall_schema('og_reg_keys'); |
| 43 |
|
|
| 44 |
|
|
| 45 |
|
// Delete variables |
| 46 |
|
$variables = array( |
| 47 |
|
'og_reg_keys_help_text', |
| 48 |
|
'og_reg_keys_message', |
| 49 |
|
'og_reg_keys_role', |
| 50 |
|
'og_reg_key_required', |
| 51 |
|
); |
| 52 |
|
|
| 53 |
|
foreach ($variables as $variable) { |
| 54 |
|
variable_del($variable); |
| 55 |
|
} |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
/** |
| 59 |
|
* This system variable haas moved to a tristate configuration. See the constant |
| 60 |
|
* definitions in og_reg_keys.module. |
| 61 |
|
*/ |
| 62 |
|
function og_reg_keys_update_6100() { |
| 63 |
|
$ret = array(); |
| 64 |
|
|
| 65 |
|
if (variable_get('og_reg_key_required', 1)) { |
| 66 |
|
variable_set('og_reg_key_required', 0); |
| 67 |
|
} |
| 68 |
|
else { |
| 69 |
|
variable_set('og_reg_key_required', 1); |
| 70 |
|
} |
| 71 |
|
|
| 72 |
|
return $ret; |
| 73 |
} |
} |