stableversion-3.0
Last change
on this file since 1e95969 was
177a560,
checked in by José Gregorio Puentes <jpuentes@…>, 8 años ago
|
se agrego el directorio de modulos contribuidos de drupal
|
-
Propiedad mode establecida a
100755
|
File size:
1.2 KB
|
Ver. | Línea | |
---|
[177a560] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * @file |
---|
| 5 | * The install and update code for the token module. |
---|
| 6 | * |
---|
| 7 | * @ingroup token |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | /** |
---|
| 11 | * Implements hook_requirements(). |
---|
| 12 | */ |
---|
| 13 | function token_requirements($phase = 'runtime') { |
---|
| 14 | $requirements = array(); |
---|
| 15 | $t = get_t(); |
---|
| 16 | |
---|
| 17 | // Check for duplicate tokens. |
---|
| 18 | if ($phase == 'runtime') { |
---|
| 19 | if ($duplicate_tokens = token_find_duplicate_tokens()) { |
---|
| 20 | foreach ($duplicate_tokens as $token => $modules) { |
---|
| 21 | $duplicate_tokens[$token] = $t('@token (defined by modules: @modules)', array('@token' => $token, '@modules' => implode(', ', $modules))); |
---|
| 22 | } |
---|
| 23 | $requirements['token_duplicates'] = array( |
---|
| 24 | 'title' => $t('Duplicate tokens'), |
---|
| 25 | 'value' => $t('The following tokens are defined by multiple modules and may cause problems when performing token replacement.'), |
---|
| 26 | 'severity' => REQUIREMENT_WARNING, |
---|
| 27 | 'description' => theme('item_list', $duplicate_tokens), |
---|
| 28 | ); |
---|
| 29 | } |
---|
| 30 | } |
---|
| 31 | |
---|
| 32 | return $requirements; |
---|
| 33 | } |
---|
| 34 | |
---|
| 35 | function token_install() { |
---|
| 36 | db_query("UPDATE {system} SET weight = 10 WHERE name = 'token'"); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | function token_update_1() { |
---|
| 40 | $ret = array(); |
---|
| 41 | $ret[] = update_sql("UPDATE {system} SET weight = 10 WHERE name = 'token'"); |
---|
| 42 | return $ret; |
---|
| 43 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.