Commit a9a2bd7b authored by frjo's avatar frjo
Browse files

Issue #2613200 by oana.hulpoi: Problem with 2.10 update and Views Load More pager module.

parent 532ee439
...@@ -250,6 +250,13 @@ function colorbox_admin_settings() { ...@@ -250,6 +250,13 @@ function colorbox_admin_settings() {
'#collapsible' => TRUE, '#collapsible' => TRUE,
'#collapsed' => TRUE, '#collapsed' => TRUE,
); );
$form['colorbox_advanced_settings']['colorbox_unique_token'] = array(
'#type' => 'radios',
'#title' => t('Unique per-request gallery token'),
'#options' => array(1 => t('On'), 0 => t('Off')),
'#default_value' => variable_get('colorbox_unique_token', 1),
'#description' => t('If On (default), Colorbox will add a unique per-request token to the gallery id to avoid images being added manually to galleries. The token was added as a security fix but some see the old behavoiur as an feature and this settings makes it possible to remove the token.'),
);
$form['colorbox_advanced_settings']['colorbox_mobile_detect'] = array( $form['colorbox_advanced_settings']['colorbox_mobile_detect'] = array(
'#type' => 'radios', '#type' => 'radios',
'#title' => t('Mobile detection'), '#title' => t('Mobile detection'),
......
...@@ -128,7 +128,7 @@ function theme_colorbox_image_formatter($variables) { ...@@ -128,7 +128,7 @@ function theme_colorbox_image_formatter($variables) {
} }
// If gallery id is not empty add unique per-request token to avoid images being added manually to galleries. // If gallery id is not empty add unique per-request token to avoid images being added manually to galleries.
if (!empty($gallery_id)) { if (!empty($gallery_id) && variable_get('colorbox_unique_token', 1)) {
// Check if gallery token has already been set, we need to reuse the token for the whole request. // Check if gallery token has already been set, we need to reuse the token for the whole request.
if (is_null($gallery_token)) { if (is_null($gallery_token)) {
// We use a short token since randomness is not critical. // We use a short token since randomness is not critical.
......
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