You are here

function _pagerer_set_variable in Pagerer 7

Store a 'pagerer' configuration variable.

Parameters

string|array $variable: the name of the pagerer configuration variable, or the entire configuration array

string $alue: the value of the pagerer configuration variable to store

2 calls to _pagerer_set_variable()
pagerer_preset_delete_form_submit in ./pagerer.admin.inc
Preset delete form - submission.
pagerer_settings_form_submit in ./pagerer.admin.inc
Main Pagerer settings admin form - submission.

File

./pagerer.module, line 2118
Pagerer

Code

function _pagerer_set_variable($variable, $value = NULL) {
  if (is_array($variable)) {
    $vars = $variable;
  }
  else {
    $vars = _pagerer_get_variable();
    if ($variable) {
      $vars[$variable] = $value;
    }
  }
  $vars = array_intersect_key($vars, array(
    'core_override_preset' => NULL,
  ));
  variable_set('pagerer', $vars);
  drupal_static_reset('_pagerer_get_variable');
}