Révision c304a780
Ajouté par Assos Assos il y a environ 6 ans
drupal7/sites/all/modules/ctools/ctools.install | ||
---|---|---|
12 | 12 |
function ctools_requirements($phase) { |
13 | 13 |
$requirements = array(); |
14 | 14 |
if ($phase == 'runtime') { |
15 |
$t = get_t(); |
|
15 | 16 |
$requirements['ctools_css_cache'] = array( |
16 |
'title' => t('CTools CSS Cache'), |
|
17 |
'title' => $t('CTools CSS Cache'),
|
|
17 | 18 |
'severity' => REQUIREMENT_OK, |
18 |
'value' => t('Exists'), |
|
19 |
'value' => $t('Exists'),
|
|
19 | 20 |
); |
20 | 21 |
|
21 | 22 |
$path = 'public://ctools/css'; |
22 | 23 |
if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY)) { |
23 |
$requirements['ctools_css_cache']['description'] = t('The CTools CSS cache directory, %path could not be created due to a misconfigured files directory. Please ensure that the files directory is correctly configured and that the webserver has permission to create directories.', array('%path' => file_uri_target($path))); |
|
24 |
$requirements['ctools_css_cache']['description'] = $t('The CTools CSS cache directory, %path could not be created due to a misconfigured files directory. Please ensure that the files directory is correctly configured and that the webserver has permission to create directories.', array('%path' => file_uri_target($path)));
|
|
24 | 25 |
$requirements['ctools_css_cache']['severity'] = REQUIREMENT_ERROR; |
25 |
$requirements['ctools_css_cache']['value'] = t('Unable to create'); |
|
26 |
$requirements['ctools_css_cache']['value'] = $t('Unable to create');
|
|
26 | 27 |
} |
27 | 28 |
|
28 | 29 |
if (!function_exists('error_get_last')) { |
29 |
$requirements['ctools_php_52']['title'] = t('CTools PHP requirements'); |
|
30 |
$requirements['ctools_php_52']['description'] = t('CTools requires certain features only available in PHP 5.2.0 or higher.'); |
|
30 |
$requirements['ctools_php_52']['title'] = $t('CTools PHP requirements');
|
|
31 |
$requirements['ctools_php_52']['description'] = $t('CTools requires certain features only available in PHP 5.2.0 or higher.');
|
|
31 | 32 |
$requirements['ctools_php_52']['severity'] = REQUIREMENT_WARNING; |
32 |
$requirements['ctools_php_52']['value'] = t('PHP !version', array('!version' => phpversion())); |
|
33 |
$requirements['ctools_php_52']['value'] = $t('PHP !version', array('!version' => phpversion()));
|
|
33 | 34 |
} |
34 | 35 |
} |
35 | 36 |
|
... | ... | |
49 | 50 |
function ctools_schema_4() { |
50 | 51 |
$schema = ctools_schema_3(); |
51 | 52 |
|
52 |
// Update the 'name' field to be 255 bytes long:
|
|
53 |
$schema['ctools_object_cache']['fields']['name']['length'] = 255;
|
|
53 |
// Removed due to alternative database configuration issues.
|
|
54 |
// @see https://www.drupal.org/project/ctools/issues/2941920
|
|
54 | 55 |
|
55 | 56 |
return $schema; |
56 | 57 |
} |
... | ... | |
280 | 281 |
* Increase the length of the ctools_object_cache.name column to 255. |
281 | 282 |
*/ |
282 | 283 |
function ctools_update_7002() { |
284 |
// Removed due to alternative database configuration issues. |
|
285 |
// @see https://www.drupal.org/project/ctools/issues/2941920 |
|
286 |
} |
|
287 |
|
|
288 |
/** |
|
289 |
* Revert the length of the ctools_object_cache.name column back to 128. |
|
290 |
*/ |
|
291 |
function ctools_update_7003() { |
|
292 |
db_delete('ctools_object_cache')->execute(); |
|
283 | 293 |
db_change_field('ctools_object_cache', 'name', 'name', array( |
284 | 294 |
'type' => 'varchar', |
285 |
'length' => '255',
|
|
295 |
'length' => '128',
|
|
286 | 296 |
'not null' => TRUE, |
297 |
'description' => 'The name of the object this cache is attached to.', |
|
287 | 298 |
)); |
288 | 299 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules