update to drupal 7.23

This commit is contained in:
Bachir Soussi Chiadmi
2013-09-24 09:05:59 +02:00
parent db5f70501a
commit e539e701f8
247 changed files with 4921 additions and 4058 deletions

View File

@@ -41,11 +41,18 @@ function image_schema() {
'not null' => TRUE,
),
'name' => array(
'description' => 'The style name.',
'description' => 'The style machine name.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
),
'label' => array(
'description' => 'The style administrative name.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('isid'),
'unique keys' => array(
@@ -448,6 +455,30 @@ function image_update_7004() {
}
}
/**
* Add a column to the 'image_style' table to store administrative labels.
*/
function image_update_7005() {
$field = array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => 'The style administrative name.',
);
db_add_field('image_styles', 'label', $field);
// Do a direct query here, rather than calling image_styles(),
// in case Image module is disabled.
$styles = db_query('SELECT name FROM {image_styles}')->fetchCol();
foreach ($styles as $style) {
db_update('image_styles')
->fields(array('label' => $style))
->condition('name', $style)
->execute();
}
}
/**
* @} End of "addtogroup updates-7.x-extra".
*/