contrib modules security updates
This commit is contained in:
@@ -55,17 +55,50 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
|
||||
'contains' => array(
|
||||
'display_type' => array('default' => 0),
|
||||
'enable_select_all_pages' => array('default' => TRUE),
|
||||
'row_clickable' => array('default' => TRUE),
|
||||
'force_single' => array('default' => FALSE),
|
||||
'entity_load_capacity' => array('default' => 10),
|
||||
'skip_batching' => array('default' => 0),
|
||||
),
|
||||
);
|
||||
$options['vbo_operations'] = array(
|
||||
'default' => array(),
|
||||
'unpack_translatable' => 'unpack_operations',
|
||||
'export' => 'export_vbo_operations',
|
||||
);
|
||||
|
||||
return $options;
|
||||
}
|
||||
|
||||
function export_vbo_operations($indent, $prefix, $storage, $option, $definition, $parents) {
|
||||
// Anti-recursion, since we use the parent export helper.
|
||||
unset($definition['export']);
|
||||
|
||||
// Find and remove all unselected/disabled operations.
|
||||
foreach ($storage['vbo_operations'] as $operation_id => $operation) {
|
||||
if (empty($operation['selected'])) {
|
||||
unset($storage['vbo_operations'][$operation_id]);
|
||||
}
|
||||
}
|
||||
|
||||
return parent::export_option($indent, $prefix, $storage, $option, $definition, $parents);
|
||||
}
|
||||
|
||||
function unpack_operations(&$translatable, $storage, $option, $definition, $parents, $keys) {
|
||||
$translatable[] = array(
|
||||
'value' => t('- Choose an operation -'),
|
||||
'keys' => array_merge($keys, array('noop')),
|
||||
);
|
||||
foreach ($storage[$option] as $key => $operation) {
|
||||
if (!empty($operation['override_label']) && !empty($operation['label'])) {
|
||||
$translatable[] = array(
|
||||
'value' => $operation['label'],
|
||||
'keys' => array_merge($keys, array($key)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function options_form(&$form, &$form_state) {
|
||||
parent::options_form($form, $form_state);
|
||||
|
||||
@@ -90,6 +123,12 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
|
||||
'#default_value' => $this->options['vbo_settings']['enable_select_all_pages'],
|
||||
'#description' => t('Check this box to enable the ability to select all items on all pages.'),
|
||||
);
|
||||
$form['vbo_settings']['row_clickable'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Make the whole row clickable'),
|
||||
'#default_value' => $this->options['vbo_settings']['row_clickable'],
|
||||
'#description' => t('Check this box to select an item when its row has been clicked. Requires JavaScript.'),
|
||||
);
|
||||
$form['vbo_settings']['force_single'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Force single'),
|
||||
@@ -102,6 +141,12 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
|
||||
'#description' => t("Improve execution performance at the cost of memory usage. Set to '1' if you're having problems."),
|
||||
'#default_value' => $this->options['vbo_settings']['entity_load_capacity'],
|
||||
);
|
||||
$form['vbo_settings']['skip_batching'] = array(
|
||||
'#type' => 'checkbox',
|
||||
'#title' => t('Skip batching'),
|
||||
'#default_value' => $this->options['vbo_settings']['skip_batching'],
|
||||
'#description' => '<b>' . t('Warning:') . '</b> ' . t('This will cause timeouts for larger amounts of selected items.'),
|
||||
);
|
||||
|
||||
// Display operations and their settings.
|
||||
$form['vbo_operations'] = array(
|
||||
@@ -142,7 +187,7 @@ class views_bulk_operations_handler_field_operations extends views_handler_field
|
||||
),
|
||||
);
|
||||
|
||||
$form['vbo_operations'][$operation_id] += $operation->adminOptionsForm($dom_id);
|
||||
$form['vbo_operations'][$operation_id] += $operation->adminOptionsForm($dom_id, $this);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user