Révision e4c061ad
Ajouté par Assos Assos il y a plus de 9 ans
drupal7/sites/all/modules/ctools/ctools.install | ||
---|---|---|
40 | 40 |
* Implements hook_schema(). |
41 | 41 |
*/ |
42 | 42 |
function ctools_schema() { |
43 |
return ctools_schema_2(); |
|
43 |
return ctools_schema_3(); |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* Version 3 of the CTools schema. |
|
48 |
*/ |
|
49 |
function ctools_schema_3() { |
|
50 |
$schema = ctools_schema_2(); |
|
51 |
|
|
52 |
// update the 'obj' field to be 128 bytes long: |
|
53 |
$schema['ctools_object_cache']['fields']['obj']['length'] = 128; |
|
54 |
|
|
55 |
return $schema; |
|
44 | 56 |
} |
45 | 57 |
|
46 | 58 |
/** |
... | ... | |
141 | 153 |
return $schema; |
142 | 154 |
} |
143 | 155 |
|
156 |
/** |
|
157 |
* Implements hook_install(). |
|
158 |
*/ |
|
159 |
function ctools_install() { |
|
160 |
// Activate our custom cache handler for the CSS cache. |
|
161 |
variable_set('cache_class_cache_ctools_css', 'CToolsCssCache'); |
|
162 |
} |
|
163 |
|
|
164 |
/** |
|
165 |
* Implements hook_uninstall(). |
|
166 |
*/ |
|
167 |
function ctools_uninstall() { |
|
168 |
variable_del('cache_class_cache_ctools_css'); |
|
169 |
} |
|
170 |
|
|
144 | 171 |
/** |
145 | 172 |
* Enlarge the ctools_object_cache.name column to prevent truncation and weird |
146 | 173 |
* errors. |
... | ... | |
217 | 244 |
) |
218 | 245 |
); |
219 | 246 |
} |
247 |
|
|
248 |
/** |
|
249 |
* Enable the custom CSS cache handler. |
|
250 |
*/ |
|
251 |
function ctools_update_7000() { |
|
252 |
variable_set('cache_class_cache_ctools_css', 'CToolsCssCache'); |
|
253 |
} |
|
254 |
|
|
255 |
/** |
|
256 |
* Increase the length of the ctools_object_cache.obj column. |
|
257 |
*/ |
|
258 |
function ctools_update_7001() { |
|
259 |
db_change_field('ctools_object_cache', 'obj', 'obj', array( |
|
260 |
'type' => 'varchar', |
|
261 |
'length' => '128', |
|
262 |
'not null' => TRUE, |
|
263 |
'description' => 'The type of the object this cache is attached to; this essentially represents the owner so that several sub-systems can use this cache.', |
|
264 |
)); |
|
265 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules