Commit ccaa3308 authored by frjo's avatar frjo
Browse files

Issue #1331736 by Uwe Mindrup: Remove old image module integration code.

parent ce6f738b
......@@ -36,32 +36,6 @@ function colorbox_admin_settings() {
'#default_value' => variable_get('colorbox_compression_type', 'min'),
);
if (module_exists('image_old')) {
$form['colorbox_image_module'] = array(
'#type' => 'fieldset',
'#title' => t('Image module settings'),
);
$form['colorbox_image_module']['colorbox_auto_image_nodes'] = array(
'#type' => 'radios',
'#title' => t('Image module integration'),
'#options' => array(0 => t('Disabled'), 1 => t('Enabled')),
'#default_value' => variable_get('colorbox_auto_image_nodes', 0),
'#description' => t('Select if Colorbox should be activated for the Image module.'),
);
$derivative_options = array();
$sizes = image_get_sizes();
foreach ($sizes as $label => $size) {
$derivative_options[$label] = $size['label'];
}
$form['colorbox_image_module']['colorbox_image_derivative'] = array(
'#type' => 'select',
'#title' => t('Image derivative'),
'#options' => $derivative_options,
'#default_value' => variable_get('colorbox_image_derivative', 'preview'),
'#description' => t('Select which image derivative to load in the Colorbox.'),
);
}
if (module_exists('insert')) {
$form['colorbox_insert_module'] = array(
'#type' => 'fieldset',
......
......@@ -222,16 +222,6 @@ function _colorbox_doheader() {
drupal_add_js(array('colorbox' => $js_settings), array('type' => 'setting', 'scope' => JS_DEFAULT));
if (module_exists('image') && variable_get('colorbox_auto_image_nodes', 0)) {
$image_derivative = variable_get('colorbox_image_derivative', 'preview');
// If the image derivative is set to IMAGE_ORIGINAL check if the
// user has access before activating Colorbox.
if (!($image_derivative == IMAGE_ORIGINAL && !user_access('view original images'))) {
drupal_add_js(array('colorbox' => array('image_derivative' => $image_derivative)), array('type' => 'setting', 'scope' => JS_DEFAULT));
drupal_add_js($path . '/js/colorbox_image_module.js');
}
}
// Add and initialise the Colorbox plugin.
drupal_add_js(colorbox_get_js());
drupal_add_js($path . '/js/colorbox.js');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment