Project

General

Profile

Revision d756b39a

Added by Assos Assos about 8 years ago

Weekly update of contrib modules

View differences:

drupal7/sites/all/modules/piwik/piwik.admin.inc
214 214
    ),
215 215
  );
216 216

  
217
  $colorbox_dependencies = '<div class="admin-requirements">';
218
  $colorbox_dependencies .= t('Requires: !module-list', array('!module-list' => (module_exists('colorbox') ? t('@module (<span class="admin-enabled">enabled</span>)', array('@module' => 'Colorbox')) : t('@module (<span class="admin-disabled">disabled</span>)', array('@module' => 'Colorbox')))));
219
  $colorbox_dependencies .= '</div>';
220

  
221
  $form['tracking']['linktracking']['piwik_trackcolorbox'] = array(
222
    '#type' => 'checkbox',
223
    '#title' => t('Track content in colorbox modal dialogs'),
224
    '#default_value' => variable_get('piwik_trackcolorbox', 1),
225
    '#description' => t('Enable to track the content shown in colorbox modal windows.') . $colorbox_dependencies,
226
    '#disabled' => (module_exists('colorbox') ? FALSE : TRUE),
227
  );
228

  
217 229
  // Message specific configurations.
218 230
  $form['tracking']['messagetracking'] = array(
219 231
    '#type' => 'fieldset',
......
476 488

  
477 489
/**
478 490
 * Layout for the custom variables table in the admin settings form.
491
 *
492
 * @param array $variables
493
 *   An array contains the form elements.
494
 *
495
 * @return string
496
 *   The rendered output.
479 497
 */
480 498
function theme_piwik_admin_custom_var_table($variables) {
481 499
  $form = $variables['form'];
......
537 555
  return $element;
538 556
}
539 557

  
558
/**
559
 * @param array $value
560
 *   An array of token values.
561
 *
562
 * @return array
563
 *   A unique array of invalid tokens.
564
 */
540 565
function _piwik_get_forbidden_tokens($value) {
541 566
  $invalid_tokens = array();
542 567
  $value_tokens = is_string($value) ? token_scan($value) : $value;
......
554 579
/**
555 580
 * Validate if a string contains forbidden tokens not allowed by privacy rules.
556 581
 *
557
 * @param $token_string
582
 * @param string $token_string
558 583
 *   A string with one or more tokens to be validated.
584
 *
559 585
 * @return boolean
560 586
 *   TRUE if blacklisted token has been found, otherwise FALSE.
561 587
 */

Also available in: Unified diff