| Commit | Line | Data |
|---|---|---|
| d93afe47 | 1 | <?php |
| d93afe47 DP |
2 | |
| 3 | /** | |
| 4 | * Implementation of hook_install(). | |
| 5 | */ | |
| 6 | function filefield_install() { | |
| 7 | } | |
| d7762f12 DP |
8 | |
| 9 | function filefield_update_1() { | |
| 10 | $ret = array(); | |
| 11 | ||
| 12 | include_once(drupal_get_path('module', 'content') .'/content.module'); | |
| 13 | include_once(drupal_get_path('module', 'content') .'/content_admin.inc'); | |
| 14 | ||
| 15 | ||
| 16 | ||
| 17 | $fields = content_fields(); | |
| 18 | ||
| 19 | foreach ($fields as $field) { | |
| 20 | switch ($field['type']) { | |
| 21 | case 'file': | |
| 22 | $columns = array( | |
| 23 | 'list' => array('type' => 'int', 'not null' => TRUE, 'default' => '0'), | |
| 24 | ); | |
| 25 | content_alter_db_field(array(), array(), $field, $columns); | |
| 26 | break; | |
| 27 | } | |
| 28 | } | |
| 29 | db_query('DELETE FROM {cache}'); | |
| 30 | return $ret; | |
| 31 | ||
| 32 | } |