Révision 66b5cbf6
Ajouté par Assos Assos il y a presque 10 ans
drupal7/sites/all/modules/twitter_block/twitter_block.install | ||
---|---|---|
32 | 32 |
'default' => '', |
33 | 33 |
'description' => 'Widget ID.', |
34 | 34 |
), |
35 |
'username' => array( |
|
36 |
'type' => 'varchar', |
|
37 |
'length' => 128, |
|
38 |
'not null' => TRUE, |
|
39 |
'default' => '', |
|
40 |
'description' => 'Account username.', |
|
41 |
), |
|
35 | 42 |
'data' => array( |
36 | 43 |
'type' => 'blob', |
37 | 44 |
'size' => 'big', |
... | ... | |
54 | 61 |
* Implements hook_uninstall(). |
55 | 62 |
*/ |
56 | 63 |
function twitter_block_uninstall() { |
57 |
// Remove blocks |
|
64 |
// Remove blocks.
|
|
58 | 65 |
db_delete('block') |
59 | 66 |
->condition('module', 'twitter_block') |
60 | 67 |
->execute(); |
... | ... | |
62 | 69 |
->condition('module', 'twitter_block') |
63 | 70 |
->execute(); |
64 | 71 |
|
65 |
// Clear the site cache |
|
72 |
// Remove variables. |
|
73 |
variable_del('twitter_block_cache'); |
|
74 |
variable_del('twitter_block_last_cache'); |
|
75 |
|
|
76 |
// Remove the cache directory. |
|
77 |
twitter_block_clear_js_cache(); |
|
78 |
|
|
79 |
// Clear the site cache. |
|
66 | 80 |
cache_clear_all(); |
67 | 81 |
} |
68 | 82 |
|
... | ... | |
70 | 84 |
* Remove any old Twitter Block blocks and install the new Twitter Block schema. |
71 | 85 |
*/ |
72 | 86 |
function twitter_block_update_7200() { |
73 |
// Remove old Twitter Block schema |
|
87 |
// Remove old Twitter Block schema.
|
|
74 | 88 |
drupal_uninstall_schema('twitter_block'); |
75 | 89 |
|
76 |
// Remove any old Twitter Block blocks |
|
90 |
// Remove any old Twitter Block blocks.
|
|
77 | 91 |
db_delete('block') |
78 | 92 |
->condition('module', 'twitter_block') |
79 | 93 |
->execute(); |
... | ... | |
81 | 95 |
->condition('module', 'twitter_block') |
82 | 96 |
->execute(); |
83 | 97 |
|
84 |
// Clear the site cache |
|
98 |
// Clear the site cache.
|
|
85 | 99 |
cache_clear_all(); |
86 | 100 |
|
87 |
// Install the new Twitter Block schema |
|
101 |
// Install the new Twitter Block schema.
|
|
88 | 102 |
drupal_install_schema('twitter_block'); |
89 | 103 |
|
90 | 104 |
return t('Removed any old Twitter Block blocks and installed the new Twitter Block schema.'); |
91 | 105 |
} |
106 |
|
|
107 |
/** |
|
108 |
* Add a column to the {twitter_block} table to store the Twitter account username. |
|
109 |
*/ |
|
110 |
function twitter_block_update_7201() { |
|
111 |
db_add_field('twitter_block', 'username', array( |
|
112 |
'type' => 'varchar', |
|
113 |
'length' => 128, |
|
114 |
'not null' => TRUE, |
|
115 |
'default' => '', |
|
116 |
'description' => 'Account username.', |
|
117 |
)); |
|
118 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules