kolab.org/www

Torsten Grote grote at kolabsys.com
Thu Jan 23 17:01:27 CET 2014


 kolab.org/www/drupal-7.18/sites/all/modules/token/tests/token_test.info                               |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.drush.inc                                     |   22 +++
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.info                                          |   10 -
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.js                                            |    8 -
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.module                                        |   36 +++-
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.pages.inc                                     |   11 -
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.test                                          |    2 
 kolab.org/www/drupal-7.18/sites/all/modules/token/token.tokens.inc                                    |    2 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/includes/menu.variable.inc                       |   20 ++
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.form.inc                                |   19 +-
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.info                                    |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.module                                  |   46 +++++-
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.variable.inc                            |   16 ++
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_admin/variable_admin.info               |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.info         |   11 -
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.module       |    5 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.variable.inc |   73 ----------
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_example/variable_example.info           |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.form.inc           |   10 +
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.info               |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.module             |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.variable.inc       |    2 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_store/variable_store.info               |    6 
 kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_views/variable_views.info               |    6 
 24 files changed, 190 insertions(+), 151 deletions(-)

New commits:
commit 4e2be8e55d919b5c1db3aad765792b44bf29ef3b
Author: Torsten Grote <grote at kolabsys.com>
Date:   Thu Jan 23 16:58:03 2014 +0100

    upgrade critical Token and Variable modules

diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/tests/token_test.info b/kolab.org/www/drupal-7.18/sites/all/modules/token/tests/token_test.info
index 9c7d245..141ed5c 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/tests/token_test.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/tests/token_test.info
@@ -5,9 +5,9 @@ core = 7.x
 files[] = token_test.module
 hidden = TRUE
 
-; Information added by drupal.org packaging script on 2012-09-12
-version = "7.x-1.3"
+; Information added by drupal.org packaging script on 2013-02-24
+version = "7.x-1.5"
 core = "7.x"
 project = "token"
-datestamp = "1347466790"
+datestamp = "1361665026"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.drush.inc b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.drush.inc
new file mode 100644
index 0000000..fc32357
--- /dev/null
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.drush.inc
@@ -0,0 +1,22 @@
+<?php
+
+/**
+ * @file
+ * Drush integration for the Token module.
+ */
+
+/**
+ * Implements hook_drush_cache_clear().
+ */
+function token_drush_cache_clear(&$types) {
+  if (function_exists('module_exists') && module_exists('token')) {
+    $types['token'] = 'drush_token_cache_clear_token_info';
+  }
+}
+
+/**
+ * Clear caches internal to Token module.
+ */
+function drush_token_cache_clear_token_info() {
+  token_clear_cache();
+}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.info b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.info
index 17a4b57..43fced1 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.info
@@ -1,15 +1,11 @@
 name = Token
 description = Provides a user interface for the Token API and some missing core tokens.
 core = 7.x
-files[] = token.module
-files[] = token.install
-files[] = token.tokens.inc
-files[] = token.pages.inc
 files[] = token.test
 
-; Information added by drupal.org packaging script on 2012-09-12
-version = "7.x-1.3"
+; Information added by drupal.org packaging script on 2013-02-24
+version = "7.x-1.5"
 core = "7.x"
 project = "token"
-datestamp = "1347466790"
+datestamp = "1361665026"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.js b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.js
index 88a75c1..98d1ac3 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.js
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.js
@@ -14,6 +14,12 @@ Drupal.behaviors.tokenDialog = {
     $('a.token-dialog', context).once('token-dialog').click(function() {
       var url = $(this).attr('href');
       var dialog = $('<div style="display: none" class="loading">' + Drupal.t('Loading token browser...') + '</div>').appendTo('body');
+
+      // Emulate the AJAX data sent normally so that we get the same theme.
+      var data = {};
+      data['ajax_page_state[theme]'] = Drupal.settings.ajaxPageState.theme;
+      data['ajax_page_state[theme_token]'] = Drupal.settings.ajaxPageState.theme_token;
+
       dialog.dialog({
         title: $(this).attr('title') || Drupal.t('Available tokens'),
         width: 700,
@@ -24,7 +30,7 @@ Drupal.behaviors.tokenDialog = {
       // Load the token tree using AJAX.
       dialog.load(
         url,
-        {},
+        data,
         function (responseText, textStatus, XMLHttpRequest) {
           dialog.removeClass('loading');
         }
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.module b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.module
index 7bba8a7..88bcc60 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.module
@@ -78,6 +78,7 @@ function token_menu() {
     'access callback' => TRUE,
     'type' => MENU_CALLBACK,
     'file' => 'token.pages.inc',
+    'theme callback' => 'ajax_base_page_theme',
   );
 
   // Devel token pages.
@@ -265,7 +266,7 @@ function token_form_block_admin_configure_alter(&$form, $form_state) {
   $form['settings']['title']['#description'] .= ' ' . t('This field supports tokens.');
   // @todo Figure out why this token validation does not seem to be working here.
   $form['settings']['title']['#element_validate'][] = 'token_element_validate';
-  $form['settings']['title']['#token_types'] = array();
+  $form['settings']['title'] += array('#token_types' => array());
 }
 
 /**
@@ -377,23 +378,26 @@ function token_clear_cache() {
  * @see token_entity_info_alter()
  * @see http://drupal.org/node/737726
  */
-function token_get_entity_mapping($value_type = 'token', $value = NULL) {
+function token_get_entity_mapping($value_type = 'token', $value = NULL, $fallback = FALSE) {
   $mapping = &drupal_static(__FUNCTION__, array());
 
   if (empty($mapping)) {
     foreach (entity_get_info() as $entity_type => $info) {
       $mapping[$entity_type] = !empty($info['token type']) ? $info['token type'] : $entity_type;
     }
+    // Allow modules to alter the mapping array.
+    drupal_alter('token_entity_mapping', $mapping);
   }
 
   if (!isset($value)) {
-    return $mapping;
+    return $value_type == 'token' ? array_flip($mapping) : $mapping;
   }
   elseif ($value_type == 'token') {
-    return array_search($value, $mapping);
+    $return = array_search($value, $mapping);
+    return $return !== FALSE ? $return : ($fallback ? $value : FALSE);
   }
   elseif ($value_type == 'entity') {
-    return isset($mapping[$value]) ? $mapping[$value] : FALSE;
+    return isset($mapping[$value]) ? $mapping[$value] : ($fallback ? $value : FALSE);
   }
 }
 
@@ -739,24 +743,28 @@ function token_element_validate_token_context(&$element, &$form_state) {
  * Implements hook_form_FORM_ID_alter().
  */
 function token_form_field_ui_field_edit_form_alter(&$form, $form_state) {
-  if (!isset($form['instance'])) {
+  if (!isset($form['instance']) || !empty($form['#field']['locked'])) {
     return;
   }
 
   if (($form['#field']['type'] == 'file' || $form['#field']['type'] == 'image') && isset($form['instance']['settings']['file_directory']) && !module_exists('filefield_paths')) {
     // GAH! We can only support global tokens in the upload file directory path.
     $form['instance']['settings']['file_directory']['#element_validate'][] = 'token_element_validate';
-    $form['instance']['settings']['file_directory']['#token_types'] = array();
-    $form['instance']['settings']['token_tree'] = array(
-      '#theme' => 'token_tree',
-      '#token_types' => array(),
-      '#weight' => $form['instance']['settings']['file_directory']['#weight'] + 0.5,
-    );
+    $form['instance']['settings']['file_directory'] += array('#token_types' => array());
     $form['instance']['settings']['file_directory']['#description'] .= ' ' . t('This field supports tokens.');
   }
 
   // Note that the description is tokenized via token_field_widget_form_alter().
   $form['instance']['description']['#description'] .= '<br />' . t('This field supports tokens.');
+  $form['instance']['description']['#element_validate'][] = 'token_element_validate';
+  $form['instance']['description'] += array('#token_types' => array());
+
+  $form['instance']['settings']['token_tree'] = array(
+    '#theme' => 'token_tree',
+    '#token_types' => array(),
+    '#dialog' => TRUE,
+    '#weight' => $form['instance']['description']['#weight'] + 0.5,
+  );
 }
 
 /**
@@ -775,6 +783,7 @@ function token_form_system_actions_configure_alter(&$form, $form_state) {
       $form['token_tree'] = array(
         '#theme' => 'token_tree',
         '#token_types' => 'all',
+        '#dialog' => TRUE,
         '#weight' => 100,
       );
       // @todo Add token validation to the action fields that can use tokens.
@@ -836,10 +845,11 @@ function token_form_user_admin_settings_alter(&$form, &$form_state) {
   }
 
   // Add the token tree UI.
-  $form['token_tree'] = array(
+  $form['email']['token_tree'] = array(
     '#theme' => 'token_tree',
     '#token_types' => array('user'),
     '#show_restricted' => TRUE,
+    '#dialog' => TRUE,
     '#weight' => 90,
   );
 }
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.pages.inc b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.pages.inc
index 4e281af..2341a9f 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.pages.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.pages.inc
@@ -56,8 +56,8 @@ function token_page_output_tree() {
   // a dialog.
   $options['dialog'] = FALSE;
 
-  $output = theme('token_tree', array($options));
-  print '<html><head><title></title>' . drupal_get_css() . drupal_get_js() . '</head>';
+  $output = theme('token_tree', $options);
+  print '<html><head>' . drupal_get_css() . drupal_get_js() . '</head>';
   print '<body class="token-tree">' . $output . '</body></html>';
   drupal_exit();
 }
@@ -231,7 +231,7 @@ function _token_clean_css_identifier($id) {
 /**
  * Menu callback; prints the available tokens and values for an object.
  */
-function token_devel_token_object($entity_type, $entity) {
+function token_devel_token_object($entity_type, $entity, $token_type = NULL) {
   $header = array(
     t('Token'),
     t('Value'),
@@ -243,7 +243,10 @@ function token_devel_token_object($entity_type, $entity) {
     'values' => TRUE,
     'data' => array($entity_type => $entity),
   );
-  $tree = token_build_tree($entity_type, $options);
+  if (!isset($token_type)) {
+    $token_type = $entity_type;
+  }
+  $tree = token_build_tree($token_type, $options);
   foreach ($tree as $token => $token_info) {
     if (!empty($token_info['restricted'])) {
       continue;
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.test b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.test
index b7e9582..59fa645 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.test
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.test
@@ -676,10 +676,12 @@ class TokenEntityTestCase extends TokenTestHelper {
     $this->assertIdentical(token_get_entity_mapping('token', 'term'), 'taxonomy_term');
     $this->assertIdentical(token_get_entity_mapping('token', 'vocabulary'), 'taxonomy_vocabulary');
     $this->assertIdentical(token_get_entity_mapping('token', 'invalid'), FALSE);
+    $this->assertIdentical(token_get_entity_mapping('token', 'invalid', TRUE), 'invalid');
     $this->assertIdentical(token_get_entity_mapping('entity', 'node'), 'node');
     $this->assertIdentical(token_get_entity_mapping('entity', 'taxonomy_term'), 'term');
     $this->assertIdentical(token_get_entity_mapping('entity', 'taxonomy_vocabulary'), 'vocabulary');
     $this->assertIdentical(token_get_entity_mapping('entity', 'invalid'), FALSE);
+    $this->assertIdentical(token_get_entity_mapping('entity', 'invalid', TRUE), 'invalid');
 
     // Test that when we send the mis-matched entity type into token_replace()
     // that we still get the tokens replaced.
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.tokens.inc b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.tokens.inc
index 3dc2d3b..e0c0b5e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/token/token.tokens.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/token/token.tokens.inc
@@ -80,7 +80,7 @@ function token_token_info_alter(&$info) {
   foreach ($date_format_types as $date_format_type => $date_format_type_info) {
     if (!isset($info['tokens']['date'][$date_format_type])) {
       $info['tokens']['date'][$date_format_type] = array(
-        'name' => $date_format_type_info['title'],
+        'name' => check_plain($date_format_type_info['title']),
         'description' => t("A date in '@type' format. (%date)", array('@type' => $date_format_type, '%date' => format_date(REQUEST_TIME, $date_format_type))),
         'module' => 'token',
       );
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/LICENSE.txt b/kolab.org/www/drupal-7.18/sites/all/modules/variable/LICENSE.txt
old mode 100644
new mode 100755
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/includes/menu.variable.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/includes/menu.variable.inc
index 444800e..c8dcfa2 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/includes/menu.variable.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/includes/menu.variable.inc
@@ -26,6 +26,26 @@ function menu_variable_info($options) {
     'description' => t('Select the source for the Secondary links.', array() , $options),
     'group' => 'menu_settings'
   );
+  $variables['menu_parent_[node_type]'] = array(
+    'type' => 'multiple',
+    'title' => t('Menu parent'),
+    'repeat' => array(
+      'type' => 'select',
+      'options' => 'menu',
+    ),
+    'group' => 'menu_settings',
+    'description' => t('Select the menu parent', array(), $options),
+  );
+  $variables['menu_options_[node_type]'] = array(
+    'type' => 'multiple',
+    'title' => t('Menu options'),
+    'repeat' => array(
+      'type' => 'options',
+      'options' => 'menu',
+    ),
+    'description' => t('Select the available menus',array() , $options),
+    'group' => 'menu_settings',
+  );
   return $variables;
 }
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.form.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.form.inc
index 15c8043..08beeed 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.form.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.form.inc
@@ -154,14 +154,19 @@ function variable_form_element_options($variable, $options = array()) {
 }
 
 /**
- * Implement validate callback
+ * Execute submit callbacks for variables in form.
  */
-function variable_form_element_validate($element, &$form_state, $form) {
-  $variable = $element['#variable'];
-  variable_include($variable);
-  $variable['value'] = isset($element['#value']) ? $element['#value'] : NULL;
-  if ($error = call_user_func($variable['validate callback'], $variable)) {
-    form_error($element, $error);
+function variable_form_submit_callback($form, &$form_state) {
+  if (isset($form['#variable_edit_form'])) {
+    // This may contain some realm options.
+    $options = isset($form['#variable_options']) ? $form['#variable_options'] : array();
+    foreach ($form['#variable_edit_form'] as $name) {
+      $variable = variable_get_info($name);
+      if ($variable && isset($variable['submit callback'])) {
+        variable_include($variable);
+        $variable['submit callback']($variable, $options, $form, $form_state);
+      }
+    }
   }
 }
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.info
index 7ab1e1e..ce3ca59 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.info
@@ -12,9 +12,9 @@ files[] = includes/taxonomy.variable.inc
 files[] = includes/translation.variable.inc
 files[] = includes/user.variable.inc
 files[] = variable.test
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.module b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.module
index 781124f..472bba7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.module
@@ -415,17 +415,36 @@ function variable_hook_info() {
  * Form for variable list
  *
  * @param $list
- *   Variable name or list of variable names
+ *   Variable name or list of variable names.
+ * @param $options
+ *   Optional array with variable options.
  */
-function variable_edit_form($form, $form_state, $list, $options = array()) {
-  // Pass on the values on the form for further reference.
-  $form['#variable_edit_form'] = $list;
-  module_load_include('form.inc', 'variable');
+function variable_edit_form($form, &$form_state, $list, $options = array()) {
+  $list = is_array($list) ? $list : array($list);
+  $form = variable_base_form($form, $form_state, $list, $options);
   $form += variable_edit_subform($list, $options);
   return variable_settings_form($form, $options);
 }
 
 /**
+ * Build base form for variable list without fields.
+ *
+ * @param $list
+ *   List of variable names.
+ * @param $options
+ *   Optional array with variable options.
+ */
+function variable_base_form($form, &$form_state, $list, $options = array()) {
+  form_load_include($form_state, 'form.inc', 'variable');
+  // Pass on the values on the form for further reference.
+  $form['#variable_edit_form'] = $list;
+  $form['#variable_options'] = $options;
+  // Run submit callback for variables in form.
+  $form['#submit'][] = 'variable_form_submit_callback';
+  return $form;
+}
+
+/**
  * Form elements for variable list.
  *
  * @param $list
@@ -682,7 +701,23 @@ function variable_form_alter(&$form, &$form_state, $form_id) {
   }
 }
 
+/**
+ * Implement validate callback.
+ *
+ * This needs to be in the module as it may be needed by form ajax callbacks.
+ */
+function variable_form_element_validate($element, &$form_state, $form) {
+  $options = isset($form['#variable_options']) ? $form['#variable_options'] : array();
+  $variable = $element['#variable'];
+  variable_include($variable);
+  $variable['value'] = isset($element['#value']) ? $element['#value'] : NULL;
+
+  $error = $variable['validate callback']($variable, $options, $element, $form, $form_state);
 
+  if ($error) {
+    form_error($element, $error);
+  }
+}
 
 /**
  * Implements hook_module_implements_alter().
@@ -765,6 +800,7 @@ function variable_settings_form_submit($form, &$form_state) {
   form_state_values_clean($form_state);
   // This may contain some realm options.
   $options = isset($form['#variable_options']) ? $form['#variable_options'] : array();
+
   // Now run regular settings submission but using variable_set_value()
   foreach ($form_state['values'] as $key => $value) {
     if (is_array($value) && isset($form_state['values']['array_filter'])) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.variable.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.variable.inc
index 0ab3331..d03679e 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.variable.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable.variable.inc
@@ -93,6 +93,7 @@ function variable_variable_type_info() {
     'element' => array('#type' => 'textfield', '#size' => 15, '#maxlength' => 10),
     'token' => TRUE,
     'validate callback' => 'variable_validate_number',
+    'format callback' => 'variable_format_number',
   );
   // Select multiple options from multiple choices
   $type['options'] = array(
@@ -275,6 +276,21 @@ function variable_format_empty($variable) {
 }
 
 /**
+ * Format variable as number.
+ */
+function variable_format_number($variable, $options = array()) {
+  if (is_numeric($variable['value'])) {
+    return (string)$variable['value'];
+  }
+  elseif (empty($variable['value'])) {
+    return '';
+  }
+  else {
+    return check_plain($variable['value']);
+  }
+}
+
+/**
  * Format variable as string. Either check plain for filter_xss.
  */
 function variable_format_string($variable, $options = array()) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_admin/variable_admin.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_admin/variable_admin.info
index 7b78612..b13dbe7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_admin/variable_admin.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_admin/variable_admin.info
@@ -3,9 +3,9 @@ description = Variable Administration UI
 dependencies[] = variable
 package = Variable
 core = 7.x
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.info
deleted file mode 100644
index d9ee706..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.info
+++ /dev/null
@@ -1,11 +0,0 @@
-name = Variable advanced
-description = Provides access to advanced low level variables. By using this you will be able to break your site badly.
-dependencies[] = variable
-package = Variable
-core = 7.x
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
-core = "7.x"
-project = "variable"
-datestamp = "1358075138"
-
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.module b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.module
deleted file mode 100644
index 1ec1275..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.module
+++ /dev/null
@@ -1,5 +0,0 @@
-<?php
-/**
- * @file
- * Drupal module - Advanced variable otpions.
- */
\ No newline at end of file
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.variable.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.variable.inc
deleted file mode 100644
index 5bd408e..0000000
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_advanced/variable_advanced.variable.inc
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/**
- * @file
- * Advanced variables.
- */
-
-/**
- * Implements hook_variable_group_info().
- */
-function variable_advanced_variable_group_info() {
-  $groups['advanced'] = array(
-    'title' => t('Advanced options'),
-    'description' => t('Advanced settings not usually exposed. Changing these variables may seriously break your site so make sure you know what you do.'),
-  );
-  return $groups;
-}
-
-/**
- * Implements hook_variable_info().
- */
-function variable_advanced_variable_info($options) {
-  // Bootstrap caching options
-  $variables['page_cache_invoke_hooks'] = array(
-    'title' => t('Cache invoke hooks'),
-    'type' => 'enable',
-    'default' => 1,
-    'group' => 'advanced',
-    'description' => T('Invoke <em>boot</em> and <em>exit</em> hooks when the page is served from cache.'),
-  );
-  $variables['actions_max_stack'] = array(
-    'title' => t('Actions recursion level'),
-    'type' => 'number',
-    'default' => 35,
-    'group' => 'advanced',
-    'description' => t('Maximum recursion level for actions before the execution is aborted.', array(), $options),
-  ); 
-  // Bootstrap language variables.
-  $variables['language_count'] = array(
-    'title' => t('Language count'),
-    'type' => 'number',
-    'default' => 1,
-    'group' => 'advanced',
-    'description' => t('Number of enabled languages, used for quick bootstrap. Not to be changed manually.', array(), $options),
-  );
-  $variables['language_types'] = array(
-    'title' => t('Language types'),
-    'type' => 'array',
-    'default callback' => 'drupal_language_types',
-    'group' => 'advanced',
-    'description' => t('Available language types.'),
-  );  
-  // Bootstrap proxy configuration
-  $variables['reverse_proxy'] = array(
-    'title' => t('Reverse proxy'),
-    'type' => 'enable',
-    'default' => 0,
-    'group' => 'advanced',
-    'description' => t('If Drupal is behind a reverse proxy, we use the X-Forwarded-For header instead of $_SERVER[\'REMOTE_ADDR\'], which would be the IP address of the proxy server, and not the client\'s. The actual header name can be configured by the reverse_proxy_header variable.', array(), $options),
-  );
-  $variables['reverse_proxy_header'] = array(
-    'title' => t('Reverse proxy header'),
-    'default' => 'HTTP_X_FORWARDED_FOR',
-    'group' => 'advanced',
-  );
-  $variables['reverse_proxy_addresses'] = array(
-    'title' => t('Reverse proxy addresses'),
-    'type' => 'array',
-    'group' => 'advanced',
-    'default' => array(),
-    'description' => t('If an array of known reverse proxy IPs is provided, then trust the XFF header if request really comes from one of them.', array(), $options),
-  );  
-  return $variables;
-}
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_example/variable_example.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_example/variable_example.info
index 64d6ff0..c4ea743 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_example/variable_example.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_example/variable_example.info
@@ -6,9 +6,9 @@ package = Example modules
 core = 7.x
 files[] = variable_example.variable.inc
 
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.form.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.form.inc
index 8805d9a..2050ba7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.form.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.form.inc
@@ -86,7 +86,10 @@ function variable_realm_edit_variables_form($form, &$form_state, $realm_name, $r
   $form['realm_name'] = array('#type' => 'value', '#value' => $realm_name);
   $form['realm_key'] = array('#type' => 'value', '#value' => $realm_key);
   $options['realm'] = variable_realm($realm_name, $realm_key);
+
   if ($variable_list = $controller->getEnabledVariables()) {
+    $form = variable_base_form($form, $form_state, $variable_list, $options);
+
     // Group variables by variable group for vertical tabls
     $group_list = array();
     foreach ($variable_list as $variable_name) {
@@ -150,6 +153,11 @@ function variable_realm_form_key_selector($realm_name, $current_key) {
   $element_name = VARIABLE_REALM_FORM_SWITCHER . $realm_name;
   $query_name = 'variable_realm_' . $realm_name . '_key';
   $controller = variable_realm_controller($realm_name);
+  $keys = $controller->getAllKeys();
+  // Don't show selector if there aren't any keys to select.
+  if (empty($keys)) {
+    return array();
+  }
   $form[$element_name] = array(
     '#type' => 'fieldset',
     '#title' => t('There are %name variables in this form', array('%name' => $controller->getVariableName())),
@@ -159,7 +167,7 @@ function variable_realm_form_key_selector($realm_name, $current_key) {
   // Replace only this element on current query string, there may be others.
   $current_query = $_GET;
   unset($current_query['q']);
-  foreach ($controller->getAllKeys() as $realm_key => $key_name) {
+  foreach ($keys as $realm_key => $key_name) {
     $query[VARIABLE_REALM_QUERY_STRING . $realm_name] = $realm_key;
     $link =  l($key_name, $_GET['q'], array('query' => $query + $current_query));
     $items[] = $current_key == $realm_key ? '<strong>' . $link . '</strong>' : $link;
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.info
index e1f56c6..f31aa86 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.info
@@ -8,9 +8,9 @@ version = 7.x-2.x
 files[] = variable_realm.class.inc
 files[] = variable_realm_union.class.inc
 
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.module b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.module
index b980741..174eaa7 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.module
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.module
@@ -600,6 +600,10 @@ function _variable_realm_invoke_all() {
   foreach (module_list() as $module) {
     if (module_hook($module, $hook) && $merge = call_user_func_array($module . '_' . $hook, $args)) {
       $result = drupal_array_merge_deep($result, $merge);
+      // Add module name to each of the realms provided by the module.
+      foreach (array_keys($merge) as $key) {
+        $result[$key] += array('module' => $module);
+      };
       unset($merge);
     }
   }
@@ -610,7 +614,7 @@ function _variable_realm_invoke_all() {
  * Implements hook_form_FORM_ID_alter()
  */
 function variable_realm_form_system_theme_settings_alter(&$form, &$form_state, $form_id) {
-  module_load_include('form.inc', 'variable_realm');
+  form_load_include($form_state, 'form.inc', 'variable_realm');
   $theme_variable = $form['var']['#value'];
   foreach (_variable_realm_variable_settings_form_list() as $realm_name => $variables) {
     if (in_array($theme_variable, variable_children($variables))) {
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.variable.inc b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.variable.inc
index 5d6897b..7ed7f25 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.variable.inc
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_realm/variable_realm.variable.inc
@@ -47,7 +47,7 @@ function variable_realm_variable_type_info() {
  * Implements hook_variable_settings_form_alter().
  */
 function variable_realm_variable_settings_form_alter(&$form, &$form_state, $form_id) {
-  module_load_include('form.inc', 'variable_realm');
+  form_load_include($form_state, 'form.inc', 'variable_realm');
   foreach (_variable_realm_variable_settings_form_list() as $realm_name => $variables) {
     if ($realm_variables = _variable_realm_variable_settings_form_alter($form, $realm_name, variable_children($variables))) {
       $form['#realm_variables'][$realm_name] = $realm_variables;
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_store/variable_store.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_store/variable_store.info
index 1da3f39..809eea2 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_store/variable_store.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_store/variable_store.info
@@ -8,9 +8,9 @@ version = 7.x-2.x
 files[] = variable_store.class.inc
 files[] = variable_store.test
 
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 
diff --git a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_views/variable_views.info b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_views/variable_views.info
index 0098950..1a04e05 100644
--- a/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_views/variable_views.info
+++ b/kolab.org/www/drupal-7.18/sites/all/modules/variable/variable_views/variable_views.info
@@ -9,9 +9,9 @@ files[] = includes/views_plugin_argument_default_variable.inc
 files[] = includes/views_handler_field_variable_title.inc
 files[] = includes/views_handler_field_variable_value.inc
 
-; Information added by drupal.org packaging script on 2013-01-13
-version = "7.x-2.2"
+; Information added by Drupal.org packaging script on 2014-01-21
+version = "7.x-2.4"
 core = "7.x"
 project = "variable"
-datestamp = "1358075138"
+datestamp = "1390310315"
 




More information about the commits mailing list