update to drupal 7.23
This commit is contained in:
@@ -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".
|
||||
*/
|
||||
|
Reference in New Issue
Block a user