security update core+modules
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(
|
||||
@@ -391,7 +398,8 @@ function image_update_7002(array &$sandbox) {
|
||||
}
|
||||
|
||||
// Process the table at the top of the list.
|
||||
$table = reset(array_keys($sandbox['tables']));
|
||||
$keys = array_keys($sandbox['tables']);
|
||||
$table = reset($keys);
|
||||
$sandbox['processed'] += _image_update_7002_populate_dimensions($table, $sandbox['tables'][$table], $sandbox['last_fid']);
|
||||
|
||||
// Has the table been fully processed?
|
||||
@@ -447,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