stableversion-3.0
Last change
on this file since 92213c1 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.0 KB
|
Ver. | Línea | |
---|
[177a560] | 1 | <?php |
---|
| 2 | |
---|
| 3 | /** |
---|
| 4 | * @file |
---|
| 5 | * Install hooks. |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | /** |
---|
| 9 | * Implementation of hook_schema(). |
---|
| 10 | */ |
---|
| 11 | function feeds_fast_news_schema() { |
---|
| 12 | // Install data tables. |
---|
| 13 | include_once('feeds_fast_news.data_default.inc'); |
---|
| 14 | $tables = feeds_fast_news_data_default(); |
---|
| 15 | $schema = array(); |
---|
| 16 | foreach ($tables as $name => $table) { |
---|
| 17 | $schema[$name] = $table->table_schema; |
---|
| 18 | } |
---|
| 19 | return $schema; |
---|
| 20 | } |
---|
| 21 | |
---|
| 22 | /** |
---|
| 23 | * Implementation of hook_install(). |
---|
| 24 | */ |
---|
| 25 | function feeds_fast_news_install() { |
---|
| 26 | // We are replacing feeds_defaults module, taking over its table. |
---|
| 27 | // Hence we cannot use drupal_install_schema('feeds_fast_news'); |
---|
| 28 | $schema = drupal_get_schema_unprocessed('feeds_fast_news'); |
---|
| 29 | _drupal_initialize_schema('feeds_fast_news', $schema); |
---|
| 30 | |
---|
| 31 | $ret = array(); |
---|
| 32 | foreach ($schema as $name => $table) { |
---|
| 33 | // Check whether table exists. |
---|
| 34 | if (!db_table_exists($name)) { |
---|
| 35 | db_create_table($ret, $name, $table); |
---|
| 36 | } |
---|
| 37 | } |
---|
| 38 | } |
---|
| 39 | |
---|
| 40 | /** |
---|
| 41 | * Implementation of hook_uninstall(); |
---|
| 42 | */ |
---|
| 43 | function feeds_fast_news_uninstall() { |
---|
| 44 | drupal_uninstall_schema('feeds_fast_news'); |
---|
| 45 | } |
---|
Nota: Vea
TracBrowser
para ayuda de uso del navegador del repositorio.