commit e4c061ad982659ec4f1d2b2873d5830dd53e6419
Author: Assos Assos <assos+forge@centrale-marseille.fr>
Date:   Wed Jan 28 23:00:36 2015 +0100

    Weekly update of contrib modules

diff --git a/drupal7/sites/all/modules/ctools/API.txt b/drupal7/sites/all/modules/ctools/API.txt
index e0441d62..b698b798 100644
--- a/drupal7/sites/all/modules/ctools/API.txt
+++ b/drupal7/sites/all/modules/ctools/API.txt
@@ -3,6 +3,9 @@ Current API Version: 2.0.8
 Please note that the API version is an internal number and does not match release numbers. It is entirely possible that releases will not increase the API version number, and increasing this number too often would burden contrib module maintainers who need to keep up with API changes.
 
 This file contains a log of changes to the API.
+API Version 2.0.9
+Changed import permissions to use the new 'use ctools import' permission.
+
 API Version 2.0.8
   Introduce ctools_class_add().
   Introduce ctools_class_remove().
diff --git a/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info b/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
index f4c974cc..1e9031d7 100644
--- a/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
+++ b/drupal7/sites/all/modules/ctools/bulk_export/bulk_export.info
@@ -3,10 +3,12 @@ description = Performs bulk exporting of data objects known about by Chaos tools
 core = 7.x
 dependencies[] = ctools
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/ctools.info b/drupal7/sites/all/modules/ctools/ctools.info
index 230dae05..bd2e3c1d 100644
--- a/drupal7/sites/all/modules/ctools/ctools.info
+++ b/drupal7/sites/all/modules/ctools/ctools.info
@@ -2,13 +2,16 @@ name = Chaos tools
 description = A library of helpful tools by Merlin of Chaos.
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 files[] = includes/context.inc
+files[] = includes/css-cache.inc
 files[] = includes/math-expr.inc
 files[] = includes/stylizer.inc
+files[] = tests/css_cache.test
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/ctools.install b/drupal7/sites/all/modules/ctools/ctools.install
index 63677fcf..e96c7432 100644
--- a/drupal7/sites/all/modules/ctools/ctools.install
+++ b/drupal7/sites/all/modules/ctools/ctools.install
@@ -40,7 +40,19 @@ function ctools_requirements($phase) {
  * Implements hook_schema().
  */
 function ctools_schema() {
-  return ctools_schema_2();
+  return ctools_schema_3();
+}
+
+/**
+ * Version 3 of the CTools schema.
+ */
+function ctools_schema_3() {
+  $schema = ctools_schema_2();
+
+  // update the 'obj' field to be 128 bytes long:
+  $schema['ctools_object_cache']['fields']['obj']['length'] = 128;
+
+  return $schema;
 }
 
 /**
@@ -141,6 +153,21 @@ function ctools_schema_1() {
   return $schema;
 }
 
+/**
+ * Implements hook_install().
+ */
+function ctools_install() {
+  // Activate our custom cache handler for the CSS cache.
+  variable_set('cache_class_cache_ctools_css', 'CToolsCssCache');
+}
+
+/**
+ * Implements hook_uninstall().
+ */
+function ctools_uninstall() {
+  variable_del('cache_class_cache_ctools_css');
+}
+
 /**
  * Enlarge the ctools_object_cache.name column to prevent truncation and weird
  * errors.
@@ -217,3 +244,22 @@ function ctools_update_6008() {
     )
   );
 }
+
+/**
+ * Enable the custom CSS cache handler.
+ */
+function ctools_update_7000() {
+  variable_set('cache_class_cache_ctools_css', 'CToolsCssCache');
+}
+
+/**
+ * Increase the length of the ctools_object_cache.obj column.
+ */
+function ctools_update_7001() {
+  db_change_field('ctools_object_cache', 'obj', 'obj', array(
+    'type' => 'varchar',
+    'length' => '128',
+    'not null' => TRUE,
+    'description' => 'The type of the object this cache is attached to; this essentially represents the owner so that several sub-systems can use this cache.',
+  ));
+}
diff --git a/drupal7/sites/all/modules/ctools/ctools.module b/drupal7/sites/all/modules/ctools/ctools.module
index 0ce44571..c37b96f6 100644
--- a/drupal7/sites/all/modules/ctools/ctools.module
+++ b/drupal7/sites/all/modules/ctools/ctools.module
@@ -9,7 +9,21 @@
  * must be implemented in the module file.
  */
 
-define('CTOOLS_API_VERSION', '2.0.7');
+define('CTOOLS_API_VERSION', '2.0.8');
+
+/**
+ * The current working ctools version.
+ *
+ * In a release, it should be 7.x-1.x, which should match what drush make will
+ * create. In a dev format, it should be 7.x-1.(x+1)-dev, which will allow
+ * modules depending on new features in ctools to depend on ctools > 7.x-1.x.
+ *
+ * To define a specific version of CTools as a dependency for another module,
+ * simply include a dependency line in that module's info file, e.g.:
+ *   ; Requires CTools v7.x-1.4 or newer.
+ *   dependencies[] = ctools (>=1.4)
+ */
+define('CTOOLS_MODULE_VERSION', '7.x-1.6');
 
 /**
  * Test the CTools API version.
@@ -536,6 +550,19 @@ function ctools_menu() {
   return $items;
 }
 
+/**
+ * Implements hook_permission().
+ */
+function ctools_permission() {
+  return array(
+    'use ctools import' => array(
+      'title' => t('Use CTools importer'),
+      'description' => t('The import functionality allows users to execute arbitrary PHP code, so extreme caution must be taken.'),
+      'restrict access' => TRUE,
+    ),
+  );
+}
+
 /**
  * Implementation of hook_cron. Clean up old caches.
  */
@@ -546,19 +573,12 @@ function ctools_cron() {
 }
 
 /**
- * Ensure the CTools CSS cache is flushed whenever hook_flush_caches is invoked.
+ * Implements hook_flush_caches().
  */
 function ctools_flush_caches() {
-  // Do not actually flush caches if running on cron. Drupal uses this hook
-  // in an inconsistent fashion and it does not necessarily mean to *flush*
-  // caches when running from cron. Instead it's just getting a list of cache
-  // tables and may not do any flushing.
-  if (!empty($GLOBALS['locks']['cron'])) {
-    return;
-  }
-
-  ctools_include('css');
-  ctools_css_flush_caches();
+  // Only return the CSS cache bin if it has been activated, to avoid
+  // drupal_flush_all_caches() from trying to truncate a non-existing table.
+  return variable_get('cache_class_cache_ctools_css', FALSE) ? array('cache_ctools_css') : array();
 }
 
 /**
@@ -638,7 +658,26 @@ function ctools_preprocess_node(&$vars) {
   }
 }
 
+
+/**
+ * Implements hook_page_alter().
+ *
+ * Last ditch attempt to remove sidebar regions if the "no blocks"
+ * functionality has been activated.
+ *
+ * @see ctools_block_list_alter().
+ */
 function ctools_page_alter(&$page) {
+  $check = drupal_static('ctools_set_no_blocks', TRUE);
+  if (!$check) {
+    foreach ($page as $region_id => $region) {
+      // @todo -- possibly we can set configuration for this so that users can
+      // specify which blocks will not get rendered.
+      if (strpos($region_id, 'sidebar') !== FALSE) {
+        unset($page[$region_id]);
+      }
+    }
+  }
   $page['#post_render'][] = 'ctools_page_token_processing';
 }
 
@@ -786,6 +825,15 @@ function ctools_js_load($js) {
   return 0;
 }
 
+/**
+ * Provides the default value for %ctools_js.
+ *
+ * This allows drupal_valid_path() to work with %ctools_js.
+ */
+function ctools_js_to_arg($arg) {
+  return empty($arg) || $arg == '%' ? 'nojs' : $arg;
+}
+
 /**
  * Menu _load hook.
  *
@@ -905,11 +953,25 @@ function ctools_block_list_alter(&$blocks) {
 }
 
 /**
- * Implement hook_modules_enabled to clear static caches for detecting new plugins
+ * Implements hook_modules_enabled().
+ *
+ * Clear caches for detecting new plugins.
  */
 function ctools_modules_enabled($modules) {
   ctools_include('plugins');
   ctools_get_plugins_reset();
+  cache_clear_all('ctools_plugin_files:', 'cache', TRUE);
+}
+
+/**
+ * Implements hook_modules_disabled().
+ *
+ * Clear caches for removing disabled plugins.
+ */
+function ctools_modules_disabled($modules) {
+  ctools_include('plugins');
+  ctools_get_plugins_reset();
+  cache_clear_all('ctools_plugin_files:', 'cache', TRUE);
 }
 
 /**
diff --git a/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info b/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
index 69a78a06..2180cec1 100644
--- a/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
+++ b/drupal7/sites/all/modules/ctools/ctools_access_ruleset/ctools_access_ruleset.info
@@ -2,11 +2,12 @@ name = Custom rulesets
 description = Create custom, exportable, reusable access rulesets for applications like Panels.
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info b/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
index bbbf2fd3..009662fa 100644
--- a/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
+++ b/drupal7/sites/all/modules/ctools/ctools_ajax_sample/ctools_ajax_sample.info
@@ -1,12 +1,13 @@
 name = Chaos Tools (CTools) AJAX Example
 description = Shows how to use the power of Chaos AJAX.
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info b/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
index 0da53ac0..b991d610 100644
--- a/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
+++ b/drupal7/sites/all/modules/ctools/ctools_custom_content/ctools_custom_content.info
@@ -2,11 +2,12 @@ name = Custom content panes
 description = Create custom, exportable, reusable content panes for applications like Panels.
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info b/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
index 92fa2778..f526be6b 100644
--- a/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
+++ b/drupal7/sites/all/modules/ctools/ctools_plugin_example/ctools_plugin_example.info
@@ -1,15 +1,16 @@
 name = Chaos Tools (CTools) Plugin Example
 description = Shows how an external module can provide ctools plugins (for Panels, etc.).
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 dependencies[] = panels
 dependencies[] = page_manager
 dependencies[] = advanced_help
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/includes/content.inc b/drupal7/sites/all/modules/ctools/includes/content.inc
index e0e5534f..b4660b43 100644
--- a/drupal7/sites/all/modules/ctools/includes/content.inc
+++ b/drupal7/sites/all/modules/ctools/includes/content.inc
@@ -244,6 +244,7 @@ function ctools_content_prepare_subtype(&$subtype, $plugin) {
  *   The content as rendered by the plugin. This content should be an array
  *   with the following possible keys:
  *   - title: The safe to render title of the content.
+ *   - title_heading: The title heading.
  *   - content: The safe to render HTML content.
  *   - links: An array of links associated with the content suitable for
  *     theme('links').
@@ -299,6 +300,7 @@ function ctools_content_render($type, $subtype, $conf, $keywords = array(), $arg
       $keywords['%title'] = empty($content->title) ? '' : $content->title;
       $content->original_title = $keywords['%title'];
       $content->title = $conf['override_title_text'];
+      $content->title_heading = isset($conf['override_title_heading']) ? $conf['override_title_heading'] : 'h2';
     }
 
     if (!empty($content->title)) {
@@ -504,8 +506,26 @@ function ctools_content_configure_form_defaults($form, &$form_state) {
       '#size' => 35,
       '#id' => 'override-title-textfield',
       '#dependency' => array('override-title-checkbox' => array(1)),
-      '#dependency_type' => 'disable',
+      '#dependency_type' => 'hidden',
     );
+    $form['override_title_heading'] = array(
+      '#type' => 'select',
+      '#default_value' => isset($conf['override_title_heading']) ? $conf['override_title_heading'] : 'h2',
+      '#options' => array(
+        'h1' => t('h1'),
+        'h2' => t('h2'),
+        'h3' => t('h3'),
+        'h4' => t('h4'),
+        'h5' => t('h5'),
+        'h6' => t('h6'),
+        'div' => t('div'),
+        'span' => t('span'),
+      ),
+      '#id' => 'override-title-heading',
+      '#dependency' => array('override-title-checkbox' => array(1)),
+      '#dependency_type' => 'hidden',
+    );
+
     $form['aligner_stop'] = array(
       '#markup' => '</div>',
     );
@@ -536,6 +556,7 @@ function ctools_content_configure_form_defaults_submit(&$form, &$form_state) {
   if (isset($form_state['values']['override_title'])) {
     $form_state['conf']['override_title'] = $form_state['values']['override_title'];
     $form_state['conf']['override_title_text'] = $form_state['values']['override_title_text'];
+    $form_state['conf']['override_title_heading'] = $form_state['values']['override_title_heading'];
   }
 }
 
diff --git a/drupal7/sites/all/modules/ctools/includes/content.menu.inc b/drupal7/sites/all/modules/ctools/includes/content.menu.inc
index c14c3683..ba32cb50 100644
--- a/drupal7/sites/all/modules/ctools/includes/content.menu.inc
+++ b/drupal7/sites/all/modules/ctools/includes/content.menu.inc
@@ -27,6 +27,9 @@ function ctools_content_autocomplete_entity($type, $string = '') {
   if ($string != '') {
     global $user;
     $entity_info = entity_get_info($type);
+    if ($type == 'node') {
+      $entity_info['entity keys']['bundle field'] = 'type';
+    }
 
     // We must query all ids, because if every one of the 10 don't have access
     // the user may never be able to autocomplete a node title.
@@ -56,6 +59,7 @@ function ctools_content_autocomplete_entity($type, $string = '') {
       }
       else {
         $matches[$result['label'] . " [id: $entity_id]"] = '<span class="autocomplete_title">' . check_plain($result['label']) . '</span>';
+        $matches[$result['label'] . " [id: $entity_id]"] .= isset($result['bundle field']) ? ' <span class="autocomplete_bundle">(' . check_plain($result['bundle field']) . ')</span>' : '';
       }
     }
 
@@ -83,6 +87,11 @@ function _ctools_buildQuery($entity_type, $entity_info, $match = NULL, $match_op
       $query->fields($base_table, array($entity_info['entity keys']['label']));
     }
 
+    // Add bundle field to the query, if it exists.
+    if (isset($entity_info['entity keys']['bundle field'])) {
+      $query->fields($base_table, array($entity_info['entity keys']['bundle field']));
+    }
+
     // Add a generic entity access tag to the query.
     $query->addTag('ctools');
 
@@ -131,6 +140,7 @@ function _ctools_getReferencableEntities($entity_type, $entity_info, $match = NU
     foreach ($results as $record) {
       $options[$record->{$entity_info['entity keys']['id']}] = array(
         'label' => isset($entity_info['entity keys']['label']) ? check_plain($record->{$entity_info['entity keys']['label']}) : $record->{$entity_info['entity keys']['id']},
+        'bundle field' => isset($entity_info['entity keys']['bundle field']) ? check_plain($record->{$entity_info['entity keys']['bundle field']}) : '',
       );
     }
   }
diff --git a/drupal7/sites/all/modules/ctools/includes/context-admin.inc b/drupal7/sites/all/modules/ctools/includes/context-admin.inc
index c774bf41..2d8c8f97 100644
--- a/drupal7/sites/all/modules/ctools/includes/context-admin.inc
+++ b/drupal7/sites/all/modules/ctools/includes/context-admin.inc
@@ -416,13 +416,14 @@ function ctools_context_ajax_item_add($mechanism = NULL, $type = NULL, $cache_ke
     ctools_cache_operation($mechanism, $cache_key, 'finalize', $object);
 
     // Very irritating way to update the form for our contexts.
-    $arg_form_state = array(
+    $arg_form_state = form_state_defaults() + array(
       'values' => array(),
-      'programmed' => FALSE,
       'process_input' => FALSE,
       'complete form' => array(),
     );
 
+    $rel_form_state = $arg_form_state;
+
     $arg_form = array(
       '#post' => array(),
       '#programmed' => FALSE,
@@ -469,7 +470,7 @@ function ctools_context_ajax_item_add($mechanism = NULL, $type = NULL, $cache_ke
     $output = array();
     if (!empty($available_relationships)) {
       ctools_context_add_item_table_buttons('relationship', $mechanism, $rel_form, $available_relationships);
-      $rel_form = form_builder('dummy_form_id', $rel_form, $arg_form_state);
+      $rel_form = form_builder('dummy_form_id', $rel_form, $rel_form_state);
       $output[] = ajax_command_replace('div#ctools-relationships-table div.buttons', drupal_render($rel_form));
     }
 
@@ -591,8 +592,16 @@ function ctools_context_ajax_item_edit($mechanism = NULL, $type = NULL, $cache_k
     $output = array();
     $output[] = ctools_modal_command_dismiss();
 
+    $arg_form_state = form_state_defaults() + array(
+      'values' => array(),
+      'process_input' => FALSE,
+      'complete form' => array(),
+    );
+
     $arg_form = array(
       '#post' => array(),
+      '#parents' => array(),
+      '#array_parents' => array(),
       '#programmed' => FALSE,
       '#tree' => FALSE,
     );
diff --git a/drupal7/sites/all/modules/ctools/includes/context.inc b/drupal7/sites/all/modules/ctools/includes/context.inc
index 3b75c0ff..6628b5f9 100644
--- a/drupal7/sites/all/modules/ctools/includes/context.inc
+++ b/drupal7/sites/all/modules/ctools/includes/context.inc
@@ -169,7 +169,12 @@ class ctools_context_required {
 
   function select($contexts, $context) {
     if (!is_array($contexts)) {
-      $contexts = array($contexts);
+      if (is_object($contexts) && $contexts instanceof ctools_context) {
+        $contexts = array($contexts->id => $contexts);
+      }
+      else {
+        $contexts = array($contexts);
+      }
     }
 
     // If we had requested a $context but that $context doesn't exist
@@ -328,13 +333,15 @@ function _ctools_context_selector($contexts, $required, $default, $num = 0) {
       $title = $num ? t('Context %count', array('%count' => $num)) : t('Context');
     }
 
-    return array(
+    $form = array(
       '#type' => 'select',
       '#options' => $options,
       '#title' => $title,
       '#default_value' => $default,
     );
   }
+
+  return $form;
 }
 
 /**
@@ -1587,7 +1594,9 @@ function ctools_access_add_restrictions($settings, $contexts) {
       $required_context = isset($plugin['required context']) ? $plugin['required context'] : array();
       $context = isset($test['context']) ? $test['context'] : array();
       $contexts = ctools_context_select($contexts, $required_context, $context);
-      $function($test['settings'], $contexts);
+      if ($contexts !== FALSE) {
+        $function($test['settings'], $contexts);
+      }
     }
   }
 }
diff --git a/drupal7/sites/all/modules/ctools/includes/css-cache.inc b/drupal7/sites/all/modules/ctools/includes/css-cache.inc
new file mode 100644
index 00000000..d88160b5
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/includes/css-cache.inc
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * @file
+ * Custom cache implementation for the CTools CSS cache.
+ */
+
+class CToolsCssCache implements DrupalCacheInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function clear($cid = NULL, $wildcard = FALSE) {
+    // Only clear the caches if the wildcard is set, this ensures that the cache
+    // is only cleared when the full caches are cleared manually (eg by invoking
+    // drupal_flush_all_caches()), and not on a cron run.
+    // @see drupal_flush_all_caches()
+    // @see system_cron()
+    if ($wildcard) {
+      ctools_include('css');
+      ctools_css_flush_caches();
+    }
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function get($cid) {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getMultiple(&$cids) {
+    return array();
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function isEmpty() {
+    return FALSE;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function set($cid, $data, $expire = CACHE_PERMANENT) {
+  }
+
+}
diff --git a/drupal7/sites/all/modules/ctools/includes/fields.inc b/drupal7/sites/all/modules/ctools/includes/fields.inc
index 162262c7..f379f5e9 100644
--- a/drupal7/sites/all/modules/ctools/includes/fields.inc
+++ b/drupal7/sites/all/modules/ctools/includes/fields.inc
@@ -79,6 +79,19 @@ function ctools_fields_get_field_formatter_settings_form($field, $formatter_type
     $instance = ctools_fields_fake_field_instance($field['field_name'], $view_mode, $formatter_type, $conf['formatter_settings']);
     $settings_form = $function($field, $instance, $view_mode, $form, $form_state);
     if ($settings_form) {
+      // Allow other modules to alter the formatter settings form.
+      $context = array(
+        'module' => $formatter['module'],
+        'formatter' => $formatter,
+        'field' => $field,
+        'instance' => $instance,
+        'view_mode' => $view_mode,
+        'form' => $form,
+        'form_state' => $form_state,
+      );
+      drupal_alter('field_formatter_settings_form', $settings_form, $context);
+
+      $settings_form['#tree'] = TRUE;
       $form['ctools_field_list']['#value'][] = $field;
       $form += $settings_form;
     }
diff --git a/drupal7/sites/all/modules/ctools/includes/modal.inc b/drupal7/sites/all/modules/ctools/includes/modal.inc
index 4f994b67..ee969aba 100644
--- a/drupal7/sites/all/modules/ctools/includes/modal.inc
+++ b/drupal7/sites/all/modules/ctools/includes/modal.inc
@@ -187,7 +187,7 @@ function ctools_modal_text_button($text, $dest, $alt, $class = '') {
 /**
  * Wrap a form so that we can use it properly with AJAX. Essentially if the
  * form wishes to render, it automatically does that, otherwise it returns
- * so we can see submission results.
+ * the render array so we can see submission results.
 
  * @param array $form
  *   An associative array containing the structure of the form.
@@ -201,9 +201,9 @@ function ctools_modal_text_button($text, $dest, $alt, $class = '') {
  *   is set, this will use ctools_modal_form_render so it will be
  *   a $command object suitable for ajax_render already.
  *
- *   The return will be NULL if the form was successfully submitted unless
- *   you specifically set re_render = TRUE. If ajax is set the
- *   form will never be redirected.
+ *   If the form was not rendered, the raw render array will be returned.
+ *
+ *   If ajax is set the form will never be redirected.
  */
 function ctools_modal_form_wrapper($form_id, &$form_state) {
   // Since this will run again on form rebuild while still in the modal, prevent
@@ -220,7 +220,7 @@ function ctools_modal_form_wrapper($form_id, &$form_state) {
   );
 
   $output = drupal_build_form($form_id, $form_state);
- if (!empty($form_state['ajax']) && (!$form_state['executed'] || $form_state['rebuild'])) {
+  if (!empty($form_state['ajax']) && (!$form_state['executed'] || $form_state['rebuild'])) {
      return ctools_modal_form_render($form_state, $output);
   }
 
diff --git a/drupal7/sites/all/modules/ctools/includes/plugins.inc b/drupal7/sites/all/modules/ctools/includes/plugins.inc
index cf3ac05c..eadb68f7 100644
--- a/drupal7/sites/all/modules/ctools/includes/plugins.inc
+++ b/drupal7/sites/all/modules/ctools/includes/plugins.inc
@@ -214,7 +214,12 @@ function ctools_plugin_api_get_hook($owner, $api) {
 function ctools_get_plugins($module, $type, $id = NULL) {
   // Store local caches of plugins and plugin info so we don't have to do full
   // lookups everytime.
-  $plugins = &drupal_static('ctools_plugins', array());
+  static $drupal_static_fast;
+  if (!isset($drupal_static_fast)) {
+    $drupal_static_fast['plugins'] = &drupal_static('ctools_plugins', array());
+  }
+  $plugins = &$drupal_static_fast['plugins'];
+
   $info = ctools_plugin_get_plugin_type_info();
 
   // Bail out noisily if an invalid module/type combination is requested.
@@ -423,25 +428,15 @@ function ctools_plugin_load_includes($info, $filename = NULL) {
   // store static of plugin arrays for reference because they can't be reincluded.
   static $plugin_arrays = array();
 
-  // If we're being asked for all plugins of a type, skip any caching
-  // we may have done because this is an admin task and it's ok to
-  // spend the extra time.
-  if (!isset($filename)) {
-    $all_files[$info['module']][$info['type']] = NULL;
-  }
-
   if (!isset($all_files[$info['module']][$info['type']])) {
-    // If a filename was set, we will try to load our list of files from
-    // cache. This is considered normal operation and we try to reduce
-    // the time spent finding files.
-    if (isset($filename)) {
-      $cache = cache_get("ctools_plugin_files:$info[module]:$info[type]");
-      if ($cache) {
-        $all_files[$info['module']][$info['type']] = $cache->data;
-      }
-    }
-
-    if (!isset($all_files[$info['module']][$info['type']])) {
+    $cache = cache_get("ctools_plugin_files:$info[module]:$info[type]");
+    if ($cache) {
+      $all_files[$info['module']][$info['type']] = $cache->data;
+    }
+    // Do not attempt any file scan even if the cached entry was empty.
+    // A NULL entry here would mean the plugin just does not exists, and we
+    // cannot afford to run file scan on production sites normal run.
+    elseif (!isset($all_files[$info['module']][$info['type']])) {
       $all_files[$info['module']][$info['type']] = array();
       // Load all our plugins.
       $directories = ctools_plugin_get_directories($info);
@@ -683,7 +678,7 @@ function ctools_plugin_process($info, $module, $identifier, $path, $file = NULL,
     if (!function_exists($function)) {
       return NULL;
     }
-    $result = $function();
+    $result = $function($info);
     if (!isset($result) || !is_array($result)) {
       return NULL;
     }
diff --git a/drupal7/sites/all/modules/ctools/includes/wizard.inc b/drupal7/sites/all/modules/ctools/includes/wizard.inc
index 6f5d7944..1a821a58 100644
--- a/drupal7/sites/all/modules/ctools/includes/wizard.inc
+++ b/drupal7/sites/all/modules/ctools/includes/wizard.inc
@@ -274,7 +274,7 @@ function ctools_wizard_wrapper($form, &$form_state) {
   if (!empty($form_info['show trail'])) {
     ctools_add_css('wizard');
     $form['ctools_trail'] = array(
-      '#markup' => theme(array('ctools_wizard_trail__' . $form_info['id'], 'ctools_wizard_trail'), array('trail' => $trail)),
+      '#markup' => theme(array('ctools_wizard_trail__' . $form_info['id'], 'ctools_wizard_trail'), array('trail' => $trail, 'form_info' => $form_info)),
       '#weight' => -1000,
     );
   }
diff --git a/drupal7/sites/all/modules/ctools/includes/wizard.theme.inc b/drupal7/sites/all/modules/ctools/includes/wizard.theme.inc
index 304906c0..c1a26468 100644
--- a/drupal7/sites/all/modules/ctools/includes/wizard.theme.inc
+++ b/drupal7/sites/all/modules/ctools/includes/wizard.theme.inc
@@ -7,19 +7,16 @@
 
 function ctools_wizard_theme(&$theme) {
   $theme['ctools_wizard_trail'] = array(
-    'variables' => array('trail' => NULL),
+    'variables' => array('trail' => NULL, 'form_info' => NULL, 'divider' => ' » '),
     'file' => 'includes/wizard.theme.inc',
   );
 }
 
 /**
- * Themable display of the 'breadcrumb' trail to show the order of the
- * forms.
+ * Themable display of the 'breadcrumb' trail to show the order of the forms.
  */
 function theme_ctools_wizard_trail($vars) {
-  $trail = $vars['trail'];
-  if (!empty($trail)) {
-    return '<div class="wizard-trail">' . implode(' » ', $trail) . '</div>';
+  if (!empty($vars['trail'])) {
+    return '<div class="wizard-trail">' . implode($vars['divider'], $vars['trail']) . '</div>';
   }
 }
-
diff --git a/drupal7/sites/all/modules/ctools/js/dependent.js b/drupal7/sites/all/modules/ctools/js/dependent.js
index e9e2447c..f74ec81b 100644
--- a/drupal7/sites/all/modules/ctools/js/dependent.js
+++ b/drupal7/sites/all/modules/ctools/js/dependent.js
@@ -40,7 +40,7 @@
   Drupal.CTools.dependent.autoAttach = function() {
     // Clear active bindings and triggers.
     for (i in Drupal.CTools.dependent.activeTriggers) {
-      $(Drupal.CTools.dependent.activeTriggers[i]).unbind('change');
+      $(Drupal.CTools.dependent.activeTriggers[i]).unbind('change.ctools-dependent');
     }
     Drupal.CTools.dependent.activeTriggers = [];
     Drupal.CTools.dependent.activeBindings = {};
@@ -194,7 +194,7 @@
             }
           }
 
-          $(trigger_id).change(function() {
+          $(trigger_id).bind('change.ctools-dependent', function() {
             // Trigger the internal change function
             // the attr('id') is used because closures are more confusing
             changeTrigger(trigger_id, bind_id);
@@ -215,7 +215,7 @@
       // is a sort of hacked one that's faster but much less flexible.
       $("select.ctools-master-dependent")
         .once('ctools-dependent')
-        .change(function() {
+        .bind('change.ctools-dependent', function() {
           var val = $(this).val();
           if (val == 'all') {
             $('.ctools-dependent-all').show(0);
@@ -225,7 +225,7 @@
             $('.ctools-dependent-' + val).show(0);
           }
         })
-        .trigger('change');
+        .trigger('change.ctools-dependent');
     }
   }
 })(jQuery);
diff --git a/drupal7/sites/all/modules/ctools/js/modal.js b/drupal7/sites/all/modules/ctools/js/modal.js
index 98f36097..37908cf3 100644
--- a/drupal7/sites/all/modules/ctools/js/modal.js
+++ b/drupal7/sites/all/modules/ctools/js/modal.js
@@ -379,9 +379,9 @@
     css.filter = 'alpha(opacity=' + (100 * css.opacity) + ')';
     content.hide();
 
-    // if we already ahve a modalContent, remove it
-    if ( $('#modalBackdrop')) $('#modalBackdrop').remove();
-    if ( $('#modalContent')) $('#modalContent').remove();
+    // If we already have modalContent, remove it.
+    if ($('#modalBackdrop').length) $('#modalBackdrop').remove();
+    if ($('#modalContent').length) $('#modalContent').remove();
 
     // position code lifted from http://www.quirksmode.org/viewport/compatibility.html
     if (self.pageYOffset) { // all except Explorer
@@ -421,12 +421,17 @@
           return true;
         }
       }
-      if( $(target).filter('*:visible').parents('#modalContent').size()) {
-        // allow the event only if target is a visible child node of #modalContent
+
+      if ($(target).is('#modalContent, body') || $(target).filter('*:visible').parents('#modalContent').length) {
+        // Allow the event only if target is a visible child node
+        // of #modalContent.
         return true;
       }
-      if ( $('#modalContent')) $('#modalContent').get(0).focus();
-      return false;
+      else {
+        $('#modalContent').focus();
+      }
+
+      event.preventDefault();
     };
     $('body').bind( 'focus', modalEventHandler );
     $('body').bind( 'keypress', modalEventHandler );
@@ -477,6 +482,16 @@
 
     // Move and resize the modalBackdrop and modalContent on resize of the window
      modalContentResize = function(){
+
+      // position code lifted from http://www.quirksmode.org/viewport/compatibility.html
+      if (self.pageYOffset) { // all except Explorer
+      var wt = self.pageYOffset;
+      } else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
+        var wt = document.documentElement.scrollTop;
+      } else if (document.body) { // all other Explorers
+        var wt = document.body.scrollTop;
+      }
+
       // Get our heights
       var docHeight = $(document).height();
       var docWidth = $(document).width();
@@ -486,7 +501,7 @@
 
       // Get where we should move content to
       var modalContent = $('#modalContent');
-      var mdcTop = ( winHeight / 2 ) - (  modalContent.outerHeight() / 2);
+      var mdcTop = wt + ( winHeight / 2 ) - ( modalContent.outerHeight() / 2);
       var mdcLeft = ( winWidth / 2 ) - ( modalContent.outerWidth() / 2);
 
       // Apply the changes
diff --git a/drupal7/sites/all/modules/ctools/page_manager/page_manager.admin.inc b/drupal7/sites/all/modules/ctools/page_manager/page_manager.admin.inc
index 6ef02687..73f1e604 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/page_manager.admin.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/page_manager.admin.inc
@@ -95,6 +95,7 @@ function page_manager_list_page($js = NULL) {
 
   $header = array(
     array('data' => t('Type'), 'class' => array('page-manager-page-type')),
+    array('data' => t('Module'), 'class' => array('page-manager-page-module')),
     array('data' => t('Name'), 'class' => array('page-manager-page-name')),
     array('data' => t('Title'), 'class' => array('page-manager-page-title')),
     array('data' => t('Path'), 'class' => array('page-manager-page-path')),
@@ -175,9 +176,18 @@ function page_manager_get_pages($tasks, &$pages, $task_id = NULL) {
     $row = array('data' => array(), 'class' => $class, 'title' => strip_tags($task['admin description']));
 
     $type = isset($task['admin type']) ? $task['admin type'] : t('System');
+    if (isset($task['module'])) {
+      $module = $task['module'];
+    }
+    elseif (isset($task['subtask']->export_module)) {
+      $module = $task['subtask']->export_module;
+    }
+    else {
+      $module = '';
+    }
     $pages['types'][$type] = $type;
     $row['data']['type'] = array('data' => $type, 'class' => array('page-manager-page-type'));
-
+    $row['data']['module'] = array('data' => $module, 'class' => array('page-manager-page-module'));
     $row['data']['name'] = array('data' => $task_name, 'class' => array('page-manager-page-name'));
     $row['data']['title'] = array('data' => $task['admin title'], 'class' => array('page-manager-page-title'));
     $row['data']['path'] = array('data' => $visible_path, 'class' => array('page-manager-page-path'));
@@ -401,7 +411,7 @@ function page_manager_list_pages_form_submit(&$form, &$form_state) {
  * Render the edit page for a a page, custom or system.
  */
 function page_manager_edit_page($page) {
-  drupal_set_title($page->subtask['admin title']);
+  drupal_set_title($page->subtask['admin title'], PASS_THROUGH);
   // Provide and process the save page form before anything else.
   $form_state = array('page' => &$page);
   $built_form = drupal_build_form('page_manager_save_page_form', $form_state);
@@ -464,7 +474,7 @@ function page_manager_edit_page_operation() {
     return;
   }
 
-  drupal_set_title($page->subtask['admin title']);
+  drupal_set_title($page->subtask['admin title'], PASS_THROUGH);
   return $output;
 }
 
@@ -577,8 +587,8 @@ function page_manager_get_operations($page, $operations = NULL) {
     ),
   );
 
-  // Restrict variant import to users who can already execute arbitrary PHP
-  if (user_access('use PHP for settings')) {
+  // Restrict variant import due to security implications.
+  if (user_access('use ctools import')) {
     $result['actions']['children']['import'] = array(
       'title' => t('Import variant'),
       'description' => t('Add a new variant to this page from code exported from another page.'),
@@ -1308,6 +1318,7 @@ function page_manager_handler_add_submit(&$form, &$form_state) {
   else {
     $handler->conf['title'] = $plugin['title'];
   }
+  $handler->conf['name'] = $form_state['values']['name'];
   $cache->new_handler = $handler;
 
   // Figure out which forms to present them with
@@ -1398,6 +1409,21 @@ function page_manager_handler_add_form($form, $form_state, $features = array())
       '#title' => t('Title'),
       '#description' => t('Administrative title of this variant. If you leave blank it will be automatically assigned.'),
     );
+
+    $form['name'] = array(
+      '#type' => 'machine_name',
+      '#title' => t('Machine name'),
+      '#required' => FALSE,
+      '#description' => t("A unique machine-readable name for this variant. It must only contain lowercase letters, numbers, and underscores. This name will be used when exporting the variant. If left empty the variant's name will be used instead."),
+      '#size' => 32,
+      '#maxlength' => 32,
+      '#machine_name' => array(
+        'exists' => 'page_manager_handler_check_machine_name',
+        'source' => array('title'),
+      ),
+      '#field_prefix' => '<span dir="ltr">' . $task['name'] . '__',
+      '#field_suffix' => '</span>&lrm;',
+    );
   }
 
   $form['handler'] = array(
@@ -1436,6 +1462,15 @@ function page_manager_handler_add_form($form, $form_state, $features = array())
   return $form;
 }
 
+/*
+ * Check if handler's machine-name is unique
+ */
+function page_manager_handler_check_machine_name($name, $element, $form_state) {
+  $name = $form_state['task']['name'] . '__' . $name;
+
+  return count(ctools_export_load_object('page_manager_handlers', 'names', array($name)));
+}
+
 /**
  * Rearrange the order of variants.
  */
@@ -1446,15 +1481,16 @@ function page_manager_handler_import($form, &$form_state) {
     '#description' => t('Enter the name of the new variant.'),
   );
 
-  if (user_access('use PHP for settings')) {
+  if (user_access('use ctools import')) {
     $form['object'] = array(
       '#type' => 'textarea',
       '#title' => t('Paste variant code here'),
       '#rows' => 15,
     );
   }
-  // Users ordinarily can't get here without the PHP block visibility perm.
-  // In case they somehow do, though, disable the form widget for extra safety.
+  // Users ordinarily can't get here without the 'import' permission, due to
+  // security implications. In case they somehow do, though, disable the form
+  // widget for extra safety.
   else {
     $form['shoveoff'] = array(
       '#markup' => '<div>' . t('You do not have sufficient permissions to perform this action.') . '</div>',
@@ -1468,7 +1504,7 @@ function page_manager_handler_import($form, &$form_state) {
  * Make sure that an import actually provides a handler.
  */
 function page_manager_handler_import_validate($form, &$form_state) {
-  if (!user_access('use PHP for settings')) {
+  if (!user_access('use ctools import')) {
     form_error($form['shoveoff'], t('You account permissions do not permit you to import.'));
     return;
   }
diff --git a/drupal7/sites/all/modules/ctools/page_manager/page_manager.info b/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
index 8103ca8c..b157f9c9 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
+++ b/drupal7/sites/all/modules/ctools/page_manager/page_manager.info
@@ -3,10 +3,11 @@ description = Provides a UI and API to manage pages within the site.
 core = 7.x
 dependencies[] = ctools
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/page_manager/page_manager.module b/drupal7/sites/all/modules/ctools/page_manager/page_manager.module
index da99a578..70237520 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/page_manager.module
+++ b/drupal7/sites/all/modules/ctools/page_manager/page_manager.module
@@ -213,6 +213,30 @@ function page_manager_menu_alter(&$items) {
     }
   }
 
+  // Override the core node revisions display to use the configured Page
+  // display handler.
+  if (!variable_get('page_manager_node_view_disabled', TRUE) && isset($items['node/%node/revisions/%/view'])) {
+    // Abstract the basic settings.
+    $item = array(
+      // Handle the page arguments.
+      'load arguments' => array(3),
+      'page arguments' => array(1, TRUE),
+
+      // Replace the normal node_show call with Page Manager's node view.
+      'page callback' => 'page_manager_node_view_page',
+
+      // Provide the correct path to the Page Manager file.
+      'file' => 'node_view.inc',
+      'file path' => drupal_get_path('module', 'page_manager') . '/plugins/tasks',
+    );
+    // Re-build the menu item using the normal values from node.module.
+    $items['node/%node/revisions/%/view'] = array(
+      'title' => 'Revisions',
+      'access callback' => '_node_revision_access',
+      'access arguments' => array(1),
+    ) + $item;
+  }
+
   return $items;
 }
 
@@ -416,16 +440,17 @@ function page_manager_cache_load($task_name) {
  */
 function page_manager_handler_get_name($task_name, $handlers, $handler) {
   $base = str_replace('-', '_', $task_name);
-  // Generate a unique name. Unlike most named objects, we don't let people choose
-  // names for task handlers because they mostly don't make sense.
-  $base .= '_' . $handler->handler;
-
-  // Once we have a base, check to see if it is used. If it is, start counting up.
-  $name = $base;
-  $count = 1;
-  // If taken
-  while (isset($handlers[$name])) {
-    $name = $base . '_' . ++$count;
+  // Optional machine name.
+  if (!empty($handler->conf['name'])) {
+    $name = $base . '__' . $handler->conf['name'];
+  }
+
+  // If no machine name was provided, generate a unique name.
+  else {
+    $base .= '__' . $handler->handler;
+
+    // Use the ctools uuid generator to generate a unique id.
+    $name = $base . '_' . ctools_uuid_generate();
   }
 
   return $name;
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/task_handlers/http_response.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/task_handlers/http_response.inc
index e5c01414..c091d9c6 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/task_handlers/http_response.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/task_handlers/http_response.inc
@@ -224,6 +224,23 @@ function page_manager_http_response_edit_settings($form, &$form_state) {
     '#description' => t('Administrative title of this variant.'),
   );
 
+  $name = isset($conf['name']) ? $conf['name'] : FALSE;
+  $form['name'] = array(
+    '#type' => 'machine_name',
+    '#title' => t('Machine name'),
+    '#required' => FALSE,
+    '#default_value' => $name,
+    '#description' => t("A unique machine-readable name for this variant. It must only contain lowercase letters, numbers, and underscores. This name will be used when exporting the variant. If left empty the variant's name will be used instead."),
+    '#size' => 32,
+    '#maxlength' => 32,
+    '#machine_name' => array(
+      'exists' => 'page_manager_handler_check_machine_name',
+      'source' => array('title'),
+    ),
+    '#field_prefix' => '<span dir="ltr">' . $form_state['task_name'] . '__',
+    '#field_suffix' => '</span>&lrm;',
+  );
+
   $form['code'] = array(
     '#title' => t('Response code'),
     '#type' => 'select',
@@ -244,7 +261,19 @@ function page_manager_http_response_edit_settings($form, &$form_state) {
 }
 
 function page_manager_http_response_edit_settings_submit($form, &$form_state) {
+  $machine_name = $form_state['handler']->name;
+  $name = $form_state['task_id'] . '__' . $form_state['values']['name'];
+
+  // If new name doesn't equal machine name, we need to update and redirect.
+  if ($machine_name !== $name) {
+    $form_state['new trail'] = $form_state['trail'];
+    $delta = array_search($machine_name, $form_state['new trail']);
+    $form_state['new trail'][$delta] = $name;
+    $form_state['handler']->name = $name;
+  }
+
   $form_state['handler']->conf['title'] = $form_state['values']['title'];
+  $form_state['handler']->conf['name'] = $form_state['values']['name'];
   $form_state['handler']->conf['code'] = $form_state['values']['code'];
   $form_state['handler']->conf['destination'] = $form_state['values']['destination'];
 }
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/comment_reply.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/comment_reply.inc
index 0fcf9e2a..ffbafe46 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/comment_reply.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/comment_reply.inc
@@ -67,7 +67,7 @@ function page_manager_comment_reply_page($node, $pid = NULL){
   }
 
   $output = ctools_context_handler_render($task, '', $contexts, array($node, $pid));
-  if ($output != FALSE) {
+  if ($output !== FALSE) {
     return $output;
   }
 
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc
index 844cd5b3..e0585e80 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_edit.inc
@@ -126,7 +126,7 @@ function page_manager_node_add($type) {
     'language' => LANGUAGE_NONE,
   );
 
-  drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)));
+  drupal_set_title(t('Create @name', array('@name' => $types[$type]->name)), PASS_THROUGH);
   return page_manager_node_edit($node);
 }
 
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_view.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_view.inc
index b8a7e0c9..ad754e0e 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_view.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/node_view.inc
@@ -78,6 +78,10 @@ function page_manager_node_view_menu_alter(&$items, $task) {
  * node view, which is node_page_view().
  */
 function page_manager_node_view_page($node) {
+  // Prep the node to be displayed so all of the regular hooks are triggered.
+  // Also save the output for later, in case it is needed.
+  $default_output = node_page_view($node);
+
   // Load my task plugin
   $task = page_manager_get_task('node_view');
 
@@ -85,32 +89,26 @@ function page_manager_node_view_page($node) {
   ctools_include('context');
   ctools_include('context-task-handler');
 
-  // We need to mimic Drupal's behavior of setting the node title here.
-  drupal_set_title($node->title);
-  $uri = entity_uri('node', $node);
-  // Set the node path as the canonical URL to prevent duplicate content.
-  drupal_add_html_head_link(array('rel' => 'canonical', 'href' => url($uri['path'], $uri['options'])), TRUE);
-  // Set the non-aliased path as a default shortlink.
-  drupal_add_html_head_link(array('rel' => 'shortlink', 'href' => url($uri['path'], array_merge($uri['options'], array('alias' => TRUE)))), TRUE);
+  // Load all contexts.
   $contexts = ctools_context_handler_get_task_contexts($task, '', array($node));
 
+  // Build the full output using the configured CTools plugin.
   $output = ctools_context_handler_render($task, '', $contexts, array($node->nid));
-  if ($output != FALSE) {
+  if ($output !== FALSE) {
     node_tag_new($node);
     return $output;
   }
 
-  $function = 'node_page_view';
+  // Try loading an override plugin.
   foreach (module_implements('page_manager_override') as $module) {
     $call = $module . '_page_manager_override';
     if (($rc = $call('node_view')) && function_exists($rc)) {
-      $function = $rc;
-      break;
+      return $rc($node);
     }
   }
 
-  // Otherwise, fall back.
-  return $function($node);
+  // Otherwise, fall back to the default output generated by node_page_view().
+  return $default_output;
 }
 
 /**
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc
index 88d46c5b..7c560fb8 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/page.admin.inc
@@ -38,7 +38,7 @@ function page_manager_page_menu(&$items, $task) {
   ) + $base;
   if ($access_callback == 'user_access') {
     $items['admin/structure/pages/import']['access callback'] = 'ctools_access_multiperm';
-    $items['admin/structure/pages/import']['access arguments'][] = 'use PHP for settings';
+    $items['admin/structure/pages/import']['access arguments'][] = 'use ctools import';
   }
 
   // AJAX callbacks for argument modal.
@@ -769,12 +769,12 @@ function page_manager_page_form_menu($form, &$form_state) {
     );
   }
   $form['menu']['parent']['weight'] = array(
-    '#title' => t('Tab weight'),
+    '#title' => t('Parent weight'),
     '#type' => 'textfield',
     '#default_value' => $menu['parent']['weight'],
     '#size' => 5,
-    '#description' => t('If the parent menu item is a tab, enter the weight of the tab. The lower the number, the more to the left it will be.'),
-    '#dependency' => array('radio:menu[type]' => array('default tab'), 'radio:menu[parent][type]' => array('tab')),
+    '#description' => t('Enter the weight of the parent item. The lower the number, the more to the left it will be.'),
+    '#dependency' => array('radio:menu[type]' => array('default tab'), 'radio:menu[parent][type]' => array('tab', 'normal')),
     '#dependency_count' => 2,
   );
 
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_edit.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_edit.inc
index 6d0135de..0b11bf01 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_edit.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_edit.inc
@@ -97,8 +97,8 @@ function page_manager_user_edit_page($account, $category = 'account') {
   $output = ctools_context_handler_render($task, '', $contexts, array($account->uid));
   if (is_array($output)) {
     $output = drupal_render($output);
-  }  
-  if ($output != FALSE) {
+  }
+  if ($output !== FALSE) {
     return $output;
   }
 
@@ -119,7 +119,7 @@ function page_manager_user_edit_page($account, $category = 'account') {
     //call drupal_build_form.
     $form_state = array();
     $form_id = 'user_profile_form';
-    $args = array($account);
+    $args = array($account, $category);
     $form_state['build_info']['args'] = $args;
     form_load_include($form_state, 'inc', 'user', 'user.pages');
     $output = drupal_build_form($form_id, $form_state);
diff --git a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_view.inc b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_view.inc
index dfb40817..c428384a 100644
--- a/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_view.inc
+++ b/drupal7/sites/all/modules/ctools/page_manager/plugins/tasks/user_view.inc
@@ -81,7 +81,7 @@ function page_manager_user_view_page($account) {
   user_build_content($account);
 
   $output = ctools_context_handler_render($task, '', $contexts, array($account->uid));
-  if ($output != FALSE) {
+  if ($output !== FALSE) {
     return $output;
   }
 
diff --git a/drupal7/sites/all/modules/ctools/plugins/access/book.inc b/drupal7/sites/all/modules/ctools/plugins/access/book.inc
new file mode 100644
index 00000000..4b4f7eaa
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/access/book.inc
@@ -0,0 +1,94 @@
+<?php
+
+/**
+ * @file
+ * Plugin to provide access control based on whether a node belongs to a book.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+if (module_exists('book')) {
+  $plugin = array(
+    'title' => t("Book: node is in a book"),
+    'description' => t('Control access based upon a node belonging to a book.'),
+    'callback' => 'ctools_book_node_ctools_access_check',
+    'default' => array('book' => array()),
+    'settings form' => 'ctools_book_node_ctools_access_settings',
+    'settings form submit' => 'ctools_book_node_ctools_access_settings_submit',
+    'summary' => 'ctools_book_node_ctools_access_summary',
+    'required context' => new ctools_context_required(t('Node'), 'node'),
+  );
+}
+
+/**
+ * Settings form for the 'by book_node' access plugin.
+ */
+function ctools_book_node_ctools_access_settings($form, &$form_state, $conf) {
+  $options = array(
+    'any' => t('In any book'),
+  );
+  $books = book_get_books();
+  foreach ($books as $bid => $book) {
+    $options[$bid] = $book['title'];
+  }
+  $form['settings']['book'] = array(
+    '#title' => t('Book'),
+    '#type' => 'checkboxes',
+    '#options' => $options,
+    '#description' => t('Pass only if the node belongs to one of the selected books'),
+    '#default_value' => $conf['book'],
+    '#required' => TRUE,
+  );
+  return $form;
+}
+
+/**
+ * Check for access.
+ */
+function ctools_book_node_ctools_access_check($conf, $context) {
+  // As far as I know there should always be a context at this point, but this
+  // is safe.
+  if (empty($context) || empty($context->data) || empty($context->data->book)) {
+    return FALSE;
+  }
+
+  if ($conf['book']['any']) {
+    return !empty($context->data->book);
+  }
+
+  foreach ($conf['book'] as $bid => $value) {
+    if ($bid == 'any') {
+      continue;
+    }
+    if ($value && ($bid == $context->data->book['bid'])) {
+      return TRUE;
+    }
+  }
+
+  return FALSE;
+}
+
+/**
+ * Provide a summary description based upon the checked node_languages.
+ */
+function ctools_book_node_ctools_access_summary($conf, $context) {
+  if ($conf['book']['any']) {
+    return t('@identifier belongs to a book', array('@identifier' => $context->identifier));
+  }
+
+  $books = array();
+  foreach ($conf['book'] as $bid => $value) {
+    if ($value) {
+      $node = node_load($bid);
+      $books[] = $node->title;
+    }
+  }
+
+  if (count($books) == 1) {
+    return t('@identifier belongs to the book "@book"', array('@book' => $books[0], '@identifier' => $context->identifier));
+  }
+
+  return t('@identifier belongs in multiple books', array('@identifier' => $context->identifier));
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/access/entity_field_value.inc b/drupal7/sites/all/modules/ctools/plugins/access/entity_field_value.inc
index ab36ca9a..fa94a481 100644
--- a/drupal7/sites/all/modules/ctools/plugins/access/entity_field_value.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/access/entity_field_value.inc
@@ -16,8 +16,8 @@ $plugin = array(
   'get child' => 'ctools_entity_field_value_ctools_access_get_child',
   'get children' => 'ctools_entity_field_value_ctools_access_get_children',
 );
-function ctools_entity_field_value_ctools_access_get_child($plugin, $parent, $child) {
 
+function ctools_entity_field_value_ctools_access_get_child($plugin, $parent, $child) {
   $plugins = &drupal_static(__FUNCTION__, array());
   if (empty($plugins[$parent . ':' . $child])) {
     list($entity_type, $bundle_type, $field_name) = explode(':', $child);
@@ -48,7 +48,6 @@ function ctools_entity_field_value_ctools_access_get_children($plugin, $parent)
 }
 
 function _ctools_entity_field_value_ctools_access_get_child($plugin, $parent, $entity_type, $bundle_type, $field_name, $entity = NULL, $bundle = NULL, $field = NULL) {
-
   // check that the entity, bundle and field arrays have a value.
   // If not, load theme using machine names.
   if (empty($entity)) {
@@ -86,12 +85,34 @@ function ctools_entity_field_value_ctools_access_settings($form, &$form_state, $
   $instance    = $instances[$field_name];
   $field       = field_info_field_by_id($instance['field_id']);
   foreach ($field['columns'] as $column => $attributes) {
-    $columns[] = _field_sql_storage_columnname($field_name, $column);
+    $columns[$column] = _field_sql_storage_columnname($field_name, $column);
   }
   ctools_include('fields');
   $entity = (object)array(
     $entity_info['entity keys']['bundle'] => $bundle_type,
   );
+
+  foreach ($columns as $column => $sql_column) {
+    if (isset($conf[$sql_column])) {
+      if (is_array($conf[$sql_column])) {
+        foreach ($conf[$sql_column] as $delta => $conf_value) {
+          if (is_numeric($delta)) {
+            if (is_array($conf_value)) {
+              $entity->{$field_name}[LANGUAGE_NONE][$delta][$column] = $conf_value[$column];
+            }
+            else {
+              $entity->{$field_name}[LANGUAGE_NONE][$delta][$column] = $conf_value;
+            }
+          }
+        }
+      }
+      else {
+        $entity->{$field_name}[LANGUAGE_NONE][0][$column] = $conf[$sql_column];
+      }
+    }
+  }
+
+  $form['#parents'] = array('settings');
   $langcode = field_valid_language(NULL);
   $form['settings'] += (array) ctools_field_invoke_field($instance, 'form', $entity_type, $entity, $form, $form_state, array('default' => TRUE, 'language' => $langcode));
   // weight is really not important once this is populated and will only interfere with the form layout.
@@ -99,26 +120,9 @@ function ctools_entity_field_value_ctools_access_settings($form, &$form_state, $
     unset($form['settings'][$element]['#weight']);
   }
 
-  // Need more logic here to handle compound fields.
-  foreach ($columns as $column) {
-    if (isset($conf[$column]) && is_array($conf[$column])) {
-      foreach ($conf[$column] as $delta => $conf_value) {
-        if (is_numeric($delta) && is_array($conf_value)) {
-          $form['settings'][$field_name][LANGUAGE_NONE][$delta]['value']['#default_value'] = $conf_value['value'];
-        }
-      }
-    }
-    else {
-      $form['settings'][$field_name][LANGUAGE_NONE]['#default_value'] = $conf[$column];
-    }
-  }
-
   return $form;
 }
 
-/**
- * Compress the entity bundles allowed to the minimum.
- */
 function ctools_entity_field_value_ctools_access_settings_submit($form, &$form_state) {
   $plugin = $form_state['plugin'];
   list($parent, $entity_type, $bundle_type, $field_name) = explode(':', $plugin['name']);
@@ -128,18 +132,77 @@ function ctools_entity_field_value_ctools_access_settings_submit($form, &$form_s
   $instance  = $instances[$field_name];
   $field     = field_info_field_by_id($instance['field_id']);
   foreach ($field['columns'] as $column => $attributes) {
-    $columns[] = _field_sql_storage_columnname($field_name, $column);
+    $columns[$column] = _field_sql_storage_columnname($field_name, $column);
+  }
+  $items = _ctools_entity_field_value_get_proper_form_items($field, $form_state['values']['settings'][$field_name][$langcode], array_keys($columns));
+  foreach ($columns as $column => $sql_column) {
+    $column_items = _ctools_entity_field_value_filter_items_by_column($items, $column);
+    $form_state['values']['settings'][$sql_column] = $column_items;
   }
+  $form_state['values']['settings'][$field_name][$langcode] = $items;
+}
+
+function _ctools_entity_field_value_get_proper_form_items($field, $form_items, $columns) {
+  $items = array();
+
+  if (!is_array($form_items)) { // Single value item.
+    foreach ($columns as $column) {
+      $items[0][$column] = $form_items;
+    }
+    return $items;
+  }
+
+  foreach ($form_items as $delta => $value) {
+    $item = array();
+    if (is_numeric($delta)) { // Array of field values.
+      if (!is_array($value)) {  // Single value in array.
+        foreach ($columns as $column) {
+          $item[$column] = $value;
+        }
+      }
+      else { // Value has colums.
+        foreach ($columns as $column) {
+          $item[$column] = isset($value[$column]) ? $value[$column] : '';
+        }
+      }
+    }
+    $items[] = $item;
+  }
+
+  // Check if $form_items is an array of columns.
+  $item = array();
+  $has_columns = FALSE;
   foreach ($columns as $column) {
-    $form_state['values']['settings'][$column] = $form_state['input']['settings'][$field_name][$langcode];
+    if (isset($form_items[$column])) {
+      $has_columns = TRUE;
+      $item[$column] =  $form_items[$column];
+    }
+    else {
+      $item[$column] = '';
+    }
+  }
+  if ($has_columns) {
+    $items[] = $item;
+  }
+
+  // Remove empty values.
+  $items = _field_filter_items($field, $items);
+  return $items;
+}
+
+function _ctools_entity_field_value_filter_items_by_column($items, $column) {
+  $column_items = array();
+  foreach ($items as $delta => $values) {
+    $column_items[$delta] = isset($values[$column]) ? $values[$column] : '';
   }
+  return $column_items;
 }
 
 /**
  * Check for access.
  */
 function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin) {
-  if (!isset($context->data)) {
+  if ((!is_object($context)) || (empty($context->data))) {
     // If the context doesn't exist -- for example, a newly added entity
     // reference is used as a pane visibility criteria -- we deny access.
     return FALSE;
@@ -166,16 +229,27 @@ function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin)
 
       // Check field value.
       foreach ($field_items as $field_value) {
-        foreach ($field_value as $field_column => $value) {
-          // Iterate through config values.
-          foreach ($conf_value_array as $conf_value) {
+        // Iterate through config values.
+        foreach ($conf_value_array as $conf_value) {
+          $match = FALSE;
+          foreach ($field_value as $field_column => $value) {
             // Check access only for stored in config column values.
-            if (isset($conf_value[$field_column]) && $value == $conf_value[$field_column]) {
-              return TRUE;
+            if (isset($conf_value[$field_column])) {
+              if ($value == $conf_value[$field_column]) {
+                $match = TRUE;
+              }
+              else {
+                $match = FALSE;
+                break;
+              }
             }
           }
+          if ($match) {
+            return TRUE;
+          }
         }
       }
+      return FALSE;
     }
   }
 
@@ -184,7 +258,7 @@ function ctools_entity_field_value_ctools_access_check($conf, $context, $plugin)
 
 function _ctools_entity_field_value_ctools_access_get_conf_field_values($values, $langcode = LANGUAGE_NONE) {
   if (!is_array($values) || !isset($values[$langcode])) {
-    return;
+    return NULL;
   }
   $conf_values = array();
 
@@ -207,41 +281,130 @@ function ctools_entity_field_value_ctools_access_summary($conf, $context, $plugi
   $entity      = (object)array(
     $entity_info['entity keys']['bundle'] => $bundle_type,
   );
-  $string = '';
   $keys   = array();
-  $values = array();
+  $value_keys = array();
+  $keyed_elements = array();
   foreach ($field['columns'] as $column => $attributes) {
     $conf_key = _field_sql_storage_columnname($field_name, $column);
-    if (count($field['columns']) > 1) {
-      // Add some sort of handling for compound fields
-    }
-    else {
-      if (isset($conf[$conf_key])) {
-        $entity->{$field_name}[LANGUAGE_NONE][] = array($column => $conf[$conf_key]);
+    $keyed_elements["@{$column}_value"] = array();
+
+    if (isset($conf[$conf_key])) {
+      if (is_array($conf[$conf_key])) {
+        $i = 0;
+        foreach ($conf[$conf_key] as $conf_value) {
+          if (!is_array($conf_value)) {
+            $entity->{$field_name}[LANGUAGE_NONE][$i][$column] = $conf_value;
+            $keyed_elements["@{$column}_value"][$i] = array('#markup' => $conf_value);
+          }
+          elseif (isset($conf_value[$column])) {
+            $entity->{$field_name}[LANGUAGE_NONE][$i][$column] = $conf_value[$column];
+            $keyed_elements["@{$column}_value"][$i] = array('#markup' => $conf_value[$column]);
+          }
+          $i++;
+        }
+      }
+      else {
+        $entity->{$field_name}[LANGUAGE_NONE][0][$column] = $conf[$conf_key];
+        $keyed_elements["@{$column}_value"][0] = array('#markup' => $conf[$conf_key]);
       }
     }
-    $string .= " @{$column} equals @{$column}_value";
+
     $keys['@' . $column] = $column;
-    $values["@{$column}_value"] = $conf[$conf_key];
+    $value_keys[] = "@{$column}_value";
   }
+  $elements = array();
+  $items = isset($entity->{$field_name}[LANGUAGE_NONE]) ? $entity->{$field_name}[LANGUAGE_NONE] : array();
   $view_mode = 'full';
-  $null      = NULL;
-  $options   = array('language' => LANGUAGE_NONE);
   ctools_include('fields');
-  $display         = field_get_display($instance, $view_mode, $entity);
+  $display = field_get_display($instance, $view_mode, $entity);
+  if (!isset($display['module'])) {
+    $display['module'] = $field['module'];
+  }
   if (isset($display['module'])) {
-    $display['type'] = 'list_default';
-    $function        = $display['module'] . '_field_formatter_view';
-    $items           = isset($entity->{$field_name}[LANGUAGE_NONE]) ? $entity->{$field_name}[LANGUAGE_NONE] : array();
+    // Choose simple formatter for well known cases.
+    switch ($display['module']) {
+      case 'text':
+        $display['type'] = 'text_default';
+        break;
+
+      case 'list':
+        $display['type'] = 'list_default';
+        if ($field['type'] == 'list_boolean') {
+          $allowed_values = list_allowed_values($field, $instance, $entity_type, $entity);
+          foreach ($items as $item) {
+            if (isset($allowed_values[$item['value']])) {
+              if ($allowed_values[$item['value']] == '') {
+                $display['type'] = 'list_key';
+                break;
+              }
+            }
+            else {
+              $display['type'] = 'list_key';
+            }
+          }
+        }
+        break;
+
+      case 'taxonomy':
+        $display['type'] = 'taxonomy_term_reference_plain';
+        break;
+
+      case 'entityreference':
+        $display['type'] = 'entityreference_label';
+        break;
+
+      default :
+        // Use field instance formatter setting.
+        break;
+    }
+
+    $function = $display['module'] . '_field_formatter_view';
     if (function_exists($function)) {
-      $elements = $function($entity_type, $entity, $field, $instance, LANGUAGE_NONE, $items, $display);
+      $entity_group = array(0 => $entity);
+      $item_group = array(0 => $items);
+      $instance_group = array(0 => $instance);
+      field_default_prepare_view($entity_type, $entity_group, $field, $instance_group, LANGUAGE_NONE, $item_group, $display);
+      $elements = $function($entity_type, $entity, $field, $instance, LANGUAGE_NONE, $item_group[0], $display);
     }
-    $value_keys = array_keys($values);
-    foreach ($value_keys as $key => $value) {
-      $values[$value] = isset($elements[$key]['#markup']) ? $elements[$key]['#markup'] : '';
+  }
+  if (count($elements) > 0) {
+    foreach ($field['columns'] as $column => $attributes) {
+      if (count($field['columns']) == 1) {
+        $keyed_elements["@{$column}_value"] = $elements;
+      }
     }
   }
-  $values = array_merge($keys, $values);
-  return t($string, $values);
+  $values = array();
+  foreach ($value_keys as $key) {
+    $output = array();
+    $elements = $keyed_elements[$key];
+    if (is_array($elements)) {
+      foreach ($elements as $element_key => $element) {
+        if (is_numeric($element_key)) {
+          $value_str= strip_tags(drupal_render($element));
+          if (strlen($value_str) > 0) {
+            $output[] = $value_str;
+          }
+        }
+      }
+    }
+    else {
+      $value_str = strip_tags(drupal_render($elements));
+      if (strlen($value_str) > 0) {
+        $output[] = $value_str;
+      }
+    }
+    $value = implode(', ', $output);
+    if ($value !== '') {
+      $values[$key] = implode(', ', $output);
+    }
+  }
+  $string = '';
+  $value_count = count($values);
+  foreach ($keys as $key_name => $column) {
+    if (isset($values[$key_name . '_value'])) {
+      $string .= ($value_count > 1) ? " @{$column} = @{$column}_value" : "@{$column}_value";
+    }
+  }
+  return t('@field is set to "!value"', array('@field' => $instance['label'], '!value' => format_string($string, array_merge($keys, $values))));
 }
-
diff --git a/drupal7/sites/all/modules/ctools/plugins/access/node_comment.inc b/drupal7/sites/all/modules/ctools/plugins/access/node_comment.inc
new file mode 100644
index 00000000..915ee20e
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/access/node_comment.inc
@@ -0,0 +1,31 @@
+<?php
+/**
+ * @file
+ * Plugin to provide access control based upon node comment status.
+ */
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'title' => t("Node: comments are open"),
+  'description' => t('Control access by the nodes comment status.'),
+  'callback' => 'ctools_node_comment_ctools_access_check',
+  'summary' => 'ctools_node_comment_ctools_access_summary',
+  'required context' => new ctools_context_required(t('Node'), 'node'),
+);
+
+/**
+ * Checks for access.
+ */
+function ctools_node_comment_ctools_access_check($conf, $context) {
+  return (!empty($context->data) && $context->data->comment == 2);
+}
+
+/**
+ * Provides a summary description based upon the checked node_status.
+ */
+function ctools_node_comment_ctools_access_summary($conf, $context) {
+  return t('Returns true if the nodes comment status is "open".');
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/access/string_length.inc b/drupal7/sites/all/modules/ctools/plugins/access/string_length.inc
index 2bad6afb..91abf227 100644
--- a/drupal7/sites/all/modules/ctools/plugins/access/string_length.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/access/string_length.inc
@@ -59,7 +59,7 @@ function ctools_string_length_ctools_access_check($conf, $context) {
       return $length < $conf['length'];
     case '<=':
       return $length <= $conf['length'];
-    case '==':
+    case '=':
       return $length == $conf['length'];
     case '!=':
       return $length != $conf['length'];
@@ -68,6 +68,8 @@ function ctools_string_length_ctools_access_check($conf, $context) {
     case '>=':
       return $length >= $conf['length'];
   }
+  // Invalid Operator sent, return FALSE.
+  return FALSE;
 }
 
 /**
diff --git a/drupal7/sites/all/modules/ctools/plugins/arguments/entity_id.inc b/drupal7/sites/all/modules/ctools/plugins/arguments/entity_id.inc
index 451d444c..214dc55f 100644
--- a/drupal7/sites/all/modules/ctools/plugins/arguments/entity_id.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/arguments/entity_id.inc
@@ -16,6 +16,10 @@ $plugin = array(
   'context' => 'ctools_argument_entity_id_context',
   'get child' => 'ctools_argument_entity_id_get_child',
   'get children' => 'ctools_argument_entity_id_get_children',
+  'default' => array(
+    'entity_id' => ''
+  ),
+  'placeholder form' => 'ctools_argument_entity_id_ctools_argument_placeholder',
 );
 
 function ctools_argument_entity_id_get_child($plugin, $parent, $child) {
@@ -57,6 +61,18 @@ function ctools_argument_entity_id_context($arg = NULL, $conf = NULL, $empty = F
   }
 
   if (!is_numeric($arg)) {
+    $preg_matches = array();
+    $match        = preg_match('/\[id: (\d+)\]/', $arg, $preg_matches);
+    if (!$match) {
+      $match = preg_match('/^id: (\d+)/', $arg, $preg_matches);
+    }
+
+    if ($match) {
+      $id = $preg_matches[1];
+    }
+    if (is_numeric($id)) {
+      return ctools_context_create('entity:' . $entity_type, $id);
+    }
     return FALSE;
   }
 
@@ -68,3 +84,59 @@ function ctools_argument_entity_id_context($arg = NULL, $conf = NULL, $empty = F
   return ctools_context_create('entity:' . $entity_type, $entity[$arg]);
 }
 
+function ctools_argument_entity_id_settings_form(&$form, &$form_state, $conf) {
+  $plugin = &$form_state['plugin'];
+
+  $form['settings']['entity'] = array(
+    '#title' => t('Enter the title or ID of a @entity entity', array('@entity' => $plugin['keyword'])),
+    '#type' => 'textfield',
+    '#maxlength' => 512,
+    '#autocomplete_path' => 'ctools/autocomplete/' . $plugin['keyword'],
+    '#weight' => -10,
+  );
+
+  if (!empty($conf['entity_id'])) {
+    $info = entity_load($plugin['keyword'], array($conf['entity_id']));
+    $info = $info[$conf['entity_id']];
+    if ($info) {
+      $entity = entity_get_info($plugin['keyword']);
+      $uri = entity_uri($plugin['keyword'], $info);
+      if (is_array($uri) && $entity['entity keys']['label']) {
+        $link = l(t("'%title' [%type id %id]", array('%title' => $info->{$entity['entity keys']['label']}, '%type' => $plugin['keyword'], '%id' => $conf['entity_id'])), $uri['path'], array('attributes' => array('target' => '_blank', 'title' => t('Open in new window')), 'html' => TRUE));
+      }
+      elseif (is_array($uri)) {
+        $link = l(t("[%type id %id]", array('%type' => $plugin['keyword'], '%id' => $conf['entity_id'])), $uri['path'], array('attributes' => array('target' => '_blank', 'title' => t('Open in new window')), 'html' => TRUE));
+      }
+      elseif ($entity['entity keys']['label']) {
+        $link = l(t("'%title' [%type id %id]", array('%title' => $info->{$entity['entity keys']['label']}, '%type' => $plugin['keyword'], '%id' => $conf['entity_id'])), file_create_url($uri), array('attributes' => array('target' => '_blank', 'title' => t('Open in new window')), 'html' => TRUE));
+      }
+      else {
+        $link = t("[%type id %id]", array('%type' => $plugin['keyword'], '%id' => $conf['entity_id']));
+      }
+      $form['settings']['entity']['#description'] = t('Currently set to !link', array('!link' => $link));
+    }
+  }
+
+  $form['settings']['entity_id'] = array(
+    '#type' => 'value',
+    '#value' => $conf['entity_id'],
+  );
+
+  $form['settings']['entity_type'] = array(
+    '#type' => 'value',
+    '#value' => $plugin['keyword'],
+  );
+
+  return $form;
+}
+
+function ctools_argument_entity_id_ctools_argument_placeholder($conf) {
+  $conf = array(
+    '#title'             => t('Enter the title or ID of a @entity entity', array('@entity' => $conf['keyword'])),
+    '#type'              => 'textfield',
+    '#maxlength'         => 512,
+    '#autocomplete_path' => 'ctools/autocomplete/' . $conf['keyword'],
+    '#weight'            => -10,
+  );
+  return $conf;
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/block/block.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/block/block.inc
index 7c551b9a..4d4c31c3 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/block/block.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/block/block.inc
@@ -148,16 +148,19 @@ function ctools_block_content_type_render($subtype, $conf) {
   $block = module_invoke($module, 'block_view', $delta);
 
   if (!empty($info)) {
+    // Valid PHP function names cannot contain hyphens.
+    $block_delta = str_replace('-', '_', $delta);
+
     // Allow modules to modify the block before it is viewed, via either
     // hook_block_view_alter() or hook_block_view_MODULE_DELTA_alter().
-    drupal_alter(array('block_view', "block_view_{$module}_{$delta}"), $block, $info);
+    drupal_alter(array('block_view', "block_view_{$module}_{$block_delta}"), $block, $info);
   }
-  $block = (object) $block;
 
   if (empty($block)) {
     return;
   }
 
+  $block = (object) $block;
   $block->module = $module;
   $block->delta = $delta;
 
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/comment/comment_links.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/comment/comment_links.inc
new file mode 100644
index 00000000..c8fefcca
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/comment/comment_links.inc
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'title' => t('Comment links'),
+  'icon' => 'icon_comment.png',
+  'description' => t('Comment links of the referenced comment.'),
+  'required context' => new ctools_context_required(t('Comment'), 'entity:comment'),
+  'category' => t('Comment'),
+  'defaults' => array(
+    'override_title' => FALSE,
+    'override_title_text' => '',
+    'build_mode' => '',
+  ),
+);
+
+/**
+ * Output function for the comment links.
+ */
+function ctools_comment_links_content_type_render($subtype, $conf, $panel_args, $context) {
+  if (!empty($context) && empty($context->data)) {
+    return;
+  }
+
+  $comment = isset($context->data) ? clone($context->data) : NULL;
+  $block = new stdClass();
+  $block->module = 'comment';
+  $block->delta  = $comment->cid;
+
+  if (empty($comment)) {
+    $block->delta   = 'placeholder';
+    $block->subject = t('Comment subject.');
+    $block->content = t('Comment links go here.');
+  }
+  else {
+    $node = node_load($comment->nid);
+    $block->subject = $comment->subject;
+    comment_build_content($comment, $node, $conf['build_mode']);
+    $block->content = $comment->content['links'];
+  }
+  return $block;
+}
+
+/**
+ * Returns an edit form for the custom type.
+ */
+function ctools_comment_links_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+
+  $entity = entity_get_info('comment');
+  $build_mode_options = array();
+  foreach ($entity['view modes'] as $mode => $option) {
+    $build_mode_options[$mode] = $option['label'];
+  }
+
+  $form['build_mode'] = array(
+    '#title' => t('Build mode'),
+    '#type' => 'select',
+    '#description' => t('Select a build mode for this comment.'),
+    '#options' => $build_mode_options,
+    '#default_value' => $conf['build_mode'],
+  );
+
+  return $form;
+}
+
+function ctools_comment_links_content_type_edit_form_submit($form, &$form_state) {
+  // Copy everything from our defaults.
+  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
+    $form_state['conf'][$key] = $form_state['values'][$key];
+  }
+}
+
+function ctools_comment_links_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" links', array('@s' => $context->identifier));
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
index d7d6319c..5861d1c5 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/entity_context/entity_field.inc
@@ -118,6 +118,8 @@ function ctools_entity_field_content_type_render($subtype, $conf, $panel_args, $
   $field_settings = array(
     'label' => $label,
     'type' => $conf['formatter'],
+    // Pass all entity field panes settings to field display settings.
+    'pane_settings' => $conf,
   );
 
   // Get the field output, and the title.
@@ -127,33 +129,19 @@ function ctools_entity_field_content_type_render($subtype, $conf, $panel_args, $
 
   $all_values = field_get_items($entity_type, $entity, $field_name, $language);
   if (!is_array($all_values)) {
-    $all_values = array();
+    // Do not render if the field is empty.
+    return;
   }
 
   // Reverse values.
   if (isset($conf['delta_reversed']) && $conf['delta_reversed']) {
-    $all_values = array_reverse($all_values);
+    $all_values = array_reverse($all_values, TRUE);
   }
 
   if (isset($conf['delta_limit'])) {
-    $delta_limit = $conf['delta_limit'];
     $offset = intval($conf['delta_offset']);
-    $total = count($all_values);
-
-    if ($delta_limit == 0) {
-      $delta_limit = $total - $offset;
-    }
-
-    $new_values = array();
-    for ($i = 0; $i < $delta_limit; $i++) {
-      $new_delta = $offset + $i;
-
-      if (isset($all_values[$new_delta])) {
-        $new_values[] = $all_values[$new_delta];
-      }
-    }
-
-    $all_values = $new_values;
+    $limit = !empty($conf['delta_limit']) ? $conf['delta_limit'] : NULL;
+    $all_values = array_slice($all_values, $offset, $limit, TRUE);
   }
 
   $clone = clone $entity;
@@ -263,10 +251,21 @@ function ctools_entity_field_content_type_formatter_styles_submit($form, &$form_
 }
 
 /**
-* Returns the administrative title for a type.
-*/
+ * Returns the administrative title for a type.
+ */
 function ctools_entity_field_content_type_admin_title($subtype, $conf, $context) {
   list($bundle, $field_name) = explode(':', $subtype);
   ctools_include('fields');
-  return t('"@s" @field', array('@s' => $context->identifier, '@field' => ctools_field_label($field_name)));
+  if (is_object($context) && isset($context->identifier)) {
+    $identifier = $context->identifier;
+  }
+  else {
+    $type = 'ctools_entity_field_content_type_admin_title';
+    $message = t('Context is missing for field: @name', array('@name' => $subtype));
+    $variables = array($subtype, $conf, $context);
+    watchdog($type, $message, $variables, $severity = WATCHDOG_NOTICE);
+    $identifier = t('Unknown');
+  }
+
+  return t('"@s" @field', array('@s' => $identifier, '@field' => ctools_field_label($field_name)));
 }
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/node/node.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/node/node.inc
index 30e06f04..7e77194c 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/node/node.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/node/node.inc
@@ -11,7 +11,7 @@
  * by the system that includes this file.
  */
 $plugin = array(
-  'title' => t('Node'),
+  'title' => t('Existing node'),
   'single' => TRUE,
   'defaults' => array(
     'nid' => '',
@@ -20,7 +20,6 @@ $plugin = array(
     'identifier' => '',
     'build_mode' => 'teaser',
   ),
-  'title' => t('Existing node'),
   'icon' => 'icon_node.png',
   'description' => t('Add a node from your site as content.'),
   'category' => t('Custom'),
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_wrapper.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_wrapper.inc
new file mode 100644
index 00000000..8e25429f
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_comment_wrapper.inc
@@ -0,0 +1,117 @@
+<?php
+
+if (module_exists('comment')) {
+  /**
+   * Plugins are described by creating a $plugin array which will be used
+   * by the system that includes this file.
+   */
+  $plugin = array(
+    'single' => TRUE,
+    'title' => t('Comments and comment form.'),
+    'icon' => 'icon_node.png',
+    'description' => t('The comments and comment form for the referenced node.'),
+    'required context' => new ctools_context_required(t('Node'), 'node'),
+    'category' => t('Node'),
+    'defaults' => array(
+      'mode' => variable_get('comment_default_mode', COMMENT_MODE_THREADED),
+      'comments_per_page' => variable_get('comment_default_per_page', '50'),
+    ),
+  );
+}
+
+/**
+ * Render the node comments.
+ */
+function ctools_node_comment_wrapper_content_type_render($subtype, $conf, $panel_args, $context) {
+  $node = isset($context->data) ? clone($context->data) : NULL;
+  $block = new stdClass();
+  $block->module = 'comments';
+  $block->delta  = $node->nid;
+
+  $renderable = array(
+    '#theme' => 'comment_wrapper__node_' . $node->type,
+    '#node' => $node,
+    'comments' => array(),
+    'comment_form' => array(),
+  );
+
+  // Add in the comments.
+  if (($node->comment_count && user_access('access comments')) || user_access('administer comments')) {
+    $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED);
+    $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50);
+    if ($cids = comment_get_thread($node, $mode, $comments_per_page)) {
+      $comments = comment_load_multiple($cids);
+      comment_prepare_thread($comments);
+      $build = comment_view_multiple($comments, $node);
+      $build['pager']['#theme'] = 'pager';
+      $renderable['comments'] = $build;
+    }
+  }
+
+  // Stuff in the comment form.
+  if ($node->comment == COMMENT_NODE_OPEN) {
+    if (user_access('post comments')) {
+      $comment = new stdClass();
+      $comment->nid = $node->nid;
+      $comment->pid = NULL;
+      $form_state = array(
+        'ctools comment alter' => TRUE,
+        'node' => $node,
+        'build_info' => array(
+          'args' => array(
+            $comment,
+          ),
+        ),
+      );
+      $renderable['comment_form'] = drupal_build_form('comment_node_' . $node->type . '_form', $form_state);
+    }
+    else if (!empty($conf['anon_links'])) {
+      $renderable['comment_form'] = theme('comment_post_forbidden', array('node' => $node));
+    }
+  }
+
+  $block->content = drupal_render($renderable);
+
+  return $block;
+}
+
+/**
+ * Returns an edit form for the comment wrapper.
+ */ 
+function ctools_node_comment_wrapper_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+  $form['mode'] = array(
+    '#type' => 'select',
+    '#title' => t('Mode'),
+    '#default_value' => $conf['mode'],
+    '#options' => _comment_get_modes(),
+    '#weight' => 1,
+  );
+  foreach (_comment_per_page() as $i) {
+    $options[$i] = t('!a comments per page', array('!a' => $i));
+  }
+  $form['comments_per_page'] = array('#type' => 'select',
+    '#title' => t('Pager'),
+    '#default_value' => $conf['comments_per_page'],
+    '#options' => $options,
+    '#weight' => 3,
+  );
+  return $form;
+}
+
+/**
+ * Submit handler for the comment wrapper settings form.
+ */
+function ctools_node_comment_wrapper_content_type_edit_form_submit($form, &$form_state) {
+  // Copy everything from our defaults.
+  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
+    $form_state['conf'][$key] = $form_state['values'][$key];
+  }
+}
+
+/**
+ * Returns the administrative title.
+ */
+function ctools_node_comment_wrapper_content_type_admin_title($subtype, $conf, $context) {
+  return t('Comments and comment form');
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_updated.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_updated.inc
index 8b709cdf..60ac4b54 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_updated.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/node_context/node_updated.inc
@@ -20,7 +20,7 @@ $plugin = array(
  * Render the custom content type.
  */
 function ctools_node_updated_content_type_render($subtype, $conf, $panel_args, $context) {
-  if (empty($context) || empty($context->data)) {
+  if (empty($context) || empty($context->data) || empty($context->data->nid)) {
     return;
   }
 
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/page/page_site_name.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/page/page_site_name.inc
index 99501f2c..3053d451 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/page/page_site_name.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/page/page_site_name.inc
@@ -7,18 +7,48 @@
  */
 
 /**
- * Plugins are described by creating a $plugin array which will be used
- * by the system that includes this file.
+ * Plugins are described by creating a $plugin array which will be used by the
+ * system that includes this file.
  */
 $plugin = array(
   'title' => t('Site name'),
   'single' => TRUE,
   'icon' => 'icon_page.png',
-  'description' => t('The name of the site.'),
+  'description' => t('The name of the site, optionally links to the front page.'),
   'category' => t('Page elements'),
   'render last' => TRUE,
+  'defaults' => array(
+    'linked' => FALSE,
+  ),
 );
 
+/**
+ * Settings form for the Site Name pane.
+ */
+function ctools_page_site_name_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+
+  $form['linked'] = array(
+    '#title' => t('Linked'),
+    '#description' => t('Link the site name to the home page.'),
+    '#type' => 'checkbox',
+    '#default_value' => isset($conf['linked']) ? $conf['linked'] : FALSE,
+  );
+
+  return $form;
+}
+
+/**
+ * The submit form stores the data in $conf.
+ */
+function ctools_page_site_name_content_type_edit_form_submit($form, &$form_state) {
+  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
+    if (isset($form_state['values'][$key])) {
+      $form_state['conf'][$key] = $form_state['values'][$key];
+    }
+  }
+}
+
 /**
  * Output function for the 'page_site_name' content type.
  *
@@ -26,7 +56,13 @@ $plugin = array(
  */
 function ctools_page_site_name_content_type_render($subtype, $conf, $panel_args) {
   $block = new stdClass();
+
   $block->content = filter_xss_admin(variable_get('site_name', 'Drupal'));
 
+  // Optionally link the site name to the homepage.
+  if (!empty($conf['linked'])) {
+    $block->content = l($block->content, '<front>');
+  }
+
   return $block;
 }
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_list.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_list.inc
index dc3124b1..7c609fb4 100644
--- a/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_list.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_list.inc
@@ -11,7 +11,13 @@ $plugin = array(
   'description' => t('Terms related to an existing term; may be child, siblings or top level.'),
   'required context' => new ctools_context_required(t('Term'), array('term', 'taxonomy_term')),
   'category' => t('Taxonomy term'),
-  'defaults' => array('title' => '', 'type' => 'child', 'list_type' => 'ul', 'path' => 'taxonomy/term'),
+  'defaults' => array(
+    'title' => '',
+    'type' => 'child',
+    'include_current_term' => FALSE,
+    'list_type' => 'ul',
+    'path' => 'taxonomy/term',
+  ),
 );
 
 function ctools_term_list_content_type_render($subtype, $conf, $panel_args, $context) {
@@ -40,6 +46,9 @@ function ctools_term_list_content_type_render($subtype, $conf, $panel_args, $con
 
       case 'child':
       default:
+        if (!empty($conf['include_current_term'])) {
+          $terms[] = $term;
+        }
         $terms = taxonomy_get_children($term->tid);
         break;
 
@@ -49,6 +58,9 @@ function ctools_term_list_content_type_render($subtype, $conf, $panel_args, $con
 
       case 'parent':
         $terms = taxonomy_get_parents($term->tid);
+        if (!empty($conf['include_current_term'])) {
+          $terms[] = $term;
+        }
         $block->title = count($terms) == 1 ? t('Parent term') : t('Parent terms');
         break;
 
@@ -116,6 +128,20 @@ function ctools_term_list_content_type_edit_form($form, &$form_state) {
     '#suffix' => '</div>',
   );
 
+  $form['include_current_term'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Include the current term in the list'),
+    '#default_value' => !empty($conf['include_current_term']),
+    '#prefix' => '<div class="clearfix no-float">',
+    '#suffix' => '</div>',
+    '#states' => array(
+      'invisible' => array(
+        ':input[name="type"], unique1' => array('!value' => 'child'),
+        ':input[name="type"], unique2' => array('!value' => 'parent'),
+      ),
+    ),
+  );
+
   $form['list_type'] = array(
     '#type' => 'select',
     '#title' => t('List type'),
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_name.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_name.inc
new file mode 100644
index 00000000..a9a88764
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/term_context/term_name.inc
@@ -0,0 +1,121 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'title' => t('Term name'),
+  'icon' => 'icon_term.png',
+  'description' => t('The name of this taxonomy term.'),
+  'required context' => new ctools_context_required(t('Term'), array('term', 'taxonomy_term')),
+  'category' => t('Taxonomy term'),
+  'defaults' => array(
+    'link' => TRUE,
+    'markup' => 'none',
+    'id' => '',
+    'class' => '',
+  ),
+);
+
+
+/**
+ * Render the custom content type.
+ */
+function ctools_term_name_content_type_render($subtype, $conf, $panel_args, $context) {
+  if (empty($context) || empty($context->data)) {
+    return;
+  }
+
+  // Get a shortcut to the term.
+  $term = $context->data;
+
+  // Load the vocabulary.
+  $vocab = taxonomy_vocabulary_load($term->vid);
+
+  // Generate the title
+  $content = !empty($conf['link']) ? l($term->name, 'taxonomy/term/' . $term->tid) : check_plain($term->name);
+
+  // Build any surrounding markup if so configured
+  if (isset($conf['markup']) && $conf['markup'] != 'none') {
+    $markup = '<' . $conf['markup'];
+    if (!empty($conf['id'])) {
+      $markup .= ' id="' . $conf['id'] . '"';
+    }
+    if (!empty($conf['class'])) {
+      $markup .= ' class="' . $conf['class'] . '"';
+    }
+    $markup .= '>' . $content . '</' . $conf['markup'] . '>' . "\n";
+    $content = $markup;
+  }
+
+  // Build the content type block.
+  $block = new stdClass();
+  $block->module  = 'term_name';
+  $block->title   = t('Name');
+  $block->content = $content;
+  $block->delta   = $term->tid;
+
+  return $block;
+}
+
+/**
+ * Returns an edit form for custom type settings.
+ */
+function ctools_term_name_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+
+  $form['markup'] = array(
+    '#title' => t('Title tag'),
+    '#type' => 'select',
+    '#options' => array(
+      'none' => t('- No tag -'),
+      'h1' => t('h1'),
+      'h2' => t('h2'),
+      'h3' => t('h3'),
+      'h4' => t('h4'),
+      'h5' => t('h5'),
+      'h6' => t('h6'),
+      'div' => t('div'),
+    ),
+    '#default_value' => $conf['markup'],
+  );
+
+  $form['id'] = array(
+    '#title' => t('CSS id to use'),
+    '#type' => 'textfield',
+    '#default_value' => $conf['id'],
+  );
+
+  $form['class'] = array(
+    '#title' => t('CSS class to use'),
+    '#type' => 'textfield',
+    '#default_value' => $conf['class'],
+  );
+
+  $form['link'] = array(
+    '#title' => t('Link to term'),
+    '#type' => 'checkbox',
+    '#default_value' => $conf['link'],
+    '#description' => t('Check here to make the name link to the term page.'),
+  );
+  return $form;
+}
+
+/**
+ * Submit handler for the custom type settings form.
+ */
+function ctools_term_name_content_type_edit_form_submit($form, &$form_state) {
+  // Copy everything from our defaults.
+  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
+    $form_state['conf'][$key] = $form_state['values'][$key];
+  }
+}
+
+/**
+ * Returns the administrative title for a type.
+ */
+function ctools_term_name_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" name', array('@s' => $context->identifier));
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/content_types/user_context/user_links.inc b/drupal7/sites/all/modules/ctools/plugins/content_types/user_context/user_links.inc
new file mode 100644
index 00000000..4a93621d
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/plugins/content_types/user_context/user_links.inc
@@ -0,0 +1,84 @@
+<?php
+
+/**
+ * Plugins are described by creating a $plugin array which will be used
+ * by the system that includes this file.
+ */
+$plugin = array(
+  'single' => TRUE,
+  'title' => t('User links'),
+  'icon' => 'icon_user.png',
+  'description' => t('User links of the referenced user.'),
+  'required context' => new ctools_context_required(t('User'), 'user'),
+  'category' => t('User'),
+  'defaults' => array(
+    'override_title' => FALSE,
+    'override_title_text' => '',
+    'build_mode' => '',
+  ),
+);
+
+/**
+ * Output function for the user links.
+ */
+function ctools_user_links_content_type_render($subtype, $conf, $panel_args, $context) {
+  if (!empty($context) && empty($context->data)) {
+    return;
+  }
+
+  $account = clone $context->data;
+  $block = new stdClass();
+  $block->module = 'user';
+  $block->delta  = $account->uid;
+
+  if (empty($account)) {
+    $block->delta   = 'placeholder';
+    $block->subject = t('User name.');
+    $block->content = t('User links go here.');
+  }
+  else {
+    $block->subject = $account->name;
+    user_build_content($account, $conf['build_mode']);
+    if (!empty($account->content['links'])) {
+      $block->content = $account->content['links'];
+    }
+    else {
+      $block->content = '';
+    }
+  }
+  return $block;
+}
+
+/**
+ * Returns an edit form for the custom type.
+ */
+function ctools_user_links_content_type_edit_form($form, &$form_state) {
+  $conf = $form_state['conf'];
+
+  $entity = entity_get_info('user');
+  $build_mode_options = array();
+  foreach ($entity['view modes'] as $mode => $option) {
+    $build_mode_options[$mode] = $option['label'];
+  }
+
+  $form['build_mode'] = array(
+    '#title' => t('Build mode'),
+    '#type' => 'select',
+    '#description' => t('Select a build mode for this user.'),
+    '#options' => $build_mode_options,
+    '#default_value' => $conf['build_mode'],
+  );
+
+  return $form;
+}
+
+function ctools_user_links_content_type_edit_form_submit($form, &$form_state) {
+  // Copy everything from our defaults.
+  foreach (array_keys($form_state['plugin']['defaults']) as $key) {
+    $form_state['conf'][$key] = $form_state['values'][$key];
+  }
+}
+
+function ctools_user_links_content_type_admin_title($subtype, $conf, $context) {
+  return t('"@s" links', array('@s' => $context->identifier));
+}
diff --git a/drupal7/sites/all/modules/ctools/plugins/contexts/string.inc b/drupal7/sites/all/modules/ctools/plugins/contexts/string.inc
index 9a715b89..e731ab74 100644
--- a/drupal7/sites/all/modules/ctools/plugins/contexts/string.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/contexts/string.inc
@@ -22,6 +22,7 @@ $plugin = array(
   'convert list' => array(
     'raw' => t('Raw string'),
     'html_safe' => t('HTML-safe string'),
+    'uppercase_words_html_safe' => t('Uppercase words HTML-safe string'),
   ),
   'convert' => 'ctools_context_string_convert',
   'placeholder form' => array(
@@ -62,6 +63,8 @@ function ctools_context_string_convert($context, $type) {
       return $context->data;
     case 'html_safe':
       return check_plain($context->data);
+    case 'uppercase_words_html_safe':
+      return ucwords(str_replace('-', ' ', check_plain($context->data)));
   }
 }
 
diff --git a/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc b/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
index 638d146f..02bfe987 100644
--- a/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
+++ b/drupal7/sites/all/modules/ctools/plugins/contexts/user.inc
@@ -88,7 +88,7 @@ function ctools_context_user_settings_form($form, &$form_state) {
   if (!empty($conf['uid'])) {
     $info = user_load($conf['uid']);
     if ($info) {
-      $form['user']['#description'] = t('Currently set to !link', array('!link' => theme('username', $info)));
+      $form['user']['#description'] = t('Currently set to !link', array('!link' => theme('username', array('account' => $info))));
     }
   }
 
diff --git a/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php b/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
index 1048e199..252cdb11 100644
--- a/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
+++ b/drupal7/sites/all/modules/ctools/plugins/export_ui/ctools_export_ui.class.php
@@ -121,7 +121,7 @@ class ctools_export_ui {
 
     switch ($op) {
       case 'import':
-        return user_access('use PHP for settings');
+        return user_access('use ctools import');
       case 'revert':
         return ($item->export_type & EXPORT_IN_DATABASE) && ($item->export_type & EXPORT_IN_CODE);
       case 'delete':
@@ -639,7 +639,7 @@ class ctools_export_ui {
   }
 
   function add_page($js, $input, $step = NULL) {
-    drupal_set_title($this->get_page_title('add'));
+    drupal_set_title($this->get_page_title('add'), PASS_THROUGH);
 
     // If a step not set, they are trying to create a new item. If a step
     // is set, they're in the process of creating an item.
@@ -676,7 +676,7 @@ class ctools_export_ui {
    * Main entry point to edit an item.
    */
   function edit_page($js, $input, $item, $step = NULL) {
-    drupal_set_title($this->get_page_title('edit', $item));
+    drupal_set_title($this->get_page_title('edit', $item), PASS_THROUGH);
 
     // Check to see if there is a cached item to get if we're using the wizard.
     if (!empty($this->plugin['use wizard'])) {
@@ -712,7 +712,7 @@ class ctools_export_ui {
    * Main entry point to clone an item.
    */
   function clone_page($js, $input, $original, $step = NULL) {
-    drupal_set_title($this->get_page_title('clone', $original));
+    drupal_set_title($this->get_page_title('clone', $original), PASS_THROUGH);
 
     // If a step not set, they are trying to create a new clone. If a step
     // is set, they're in the process of cloning an item.
@@ -1218,7 +1218,7 @@ class ctools_export_ui {
    * Page callback to display export information for an exportable item.
    */
   function export_page($js, $input, $item) {
-    drupal_set_title($this->get_page_title('export', $item));
+    drupal_set_title($this->get_page_title('export', $item), PASS_THROUGH);
     return drupal_get_form('ctools_export_form', ctools_export_crud_export($this->plugin['schema'], $item), t('Export'));
   }
 
@@ -1226,7 +1226,7 @@ class ctools_export_ui {
    * Page callback to import information for an exportable item.
    */
   function import_page($js, $input, $step = NULL) {
-    drupal_set_title($this->get_page_title('import'));
+    drupal_set_title($this->get_page_title('import'), PASS_THROUGH);
     // Import is basically a multi step wizard form, so let's go ahead and
     // use CTools' wizard.inc for it.
 
@@ -1339,7 +1339,7 @@ function _ctools_export_ui_add_form_files($form, &$form_state) {
  *
  * This simply loads the object defined in the plugin and hands it off.
  */
-function ctools_export_ui_list_form($form, $form_state) {
+function ctools_export_ui_list_form($form, &$form_state) {
   $form_state['object']->list_form($form, $form_state);
   return $form;
 }
diff --git a/drupal7/sites/all/modules/ctools/stylizer/stylizer.info b/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
index 9acbe737..d73a641d 100644
--- a/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
+++ b/drupal7/sites/all/modules/ctools/stylizer/stylizer.info
@@ -2,12 +2,13 @@ name = Stylizer
 description = Create custom styles for applications such as Panels.
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 dependencies[] = color
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/term_depth/term_depth.info b/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
index 0b035582..5f4ef707 100644
--- a/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
+++ b/drupal7/sites/all/modules/ctools/term_depth/term_depth.info
@@ -3,9 +3,11 @@ description = Controls access to context based upon term depth
 core = 7.x
 dependencies[] = ctools
 package = Chaos tool suite
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+version = CTOOLS_MODULE_VERSION
+
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/tests/css_cache.test b/drupal7/sites/all/modules/ctools/tests/css_cache.test
new file mode 100644
index 00000000..e289b42c
--- /dev/null
+++ b/drupal7/sites/all/modules/ctools/tests/css_cache.test
@@ -0,0 +1,48 @@
+<?php
+/**
+ * @file
+ * Tests the custom CSS cache handler.
+ */
+
+/**
+ * Tests the custom CSS cache handler.
+ */
+class CtoolsObjectCache extends DrupalWebTestCase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static function getInfo() {
+    return array(
+      'name' => 'Ctools CSS cache',
+      'description' => 'Tests the custom CSS cache handler.',
+      'group' => 'Chaos Tools Suite',
+    );
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp() {
+    parent::setUp('ctools');
+  }
+
+  /**
+   * Tests the custom CSS cache handler.
+   *
+   * @see https://drupal.org/node/1313368
+   */
+  public function testCssCache() {
+    // Create a CSS cache entry.
+    $filename = ctools_css_cache('body { color: red; }');
+
+    // Perform a cron run. The CSS cache entry should not be removed.
+    $this->cronRun();
+    $this->assertTrue(file_exists($filename), 'The CSS cache is not cleared after performing a cron run.');
+
+    // Manually clear the caches. The CSS cache entry should be removed.
+    drupal_flush_all_caches();
+    $this->assertFalse(file_exists($filename), 'The CSS cache is cleared after clearing all caches.');
+  }
+
+}
diff --git a/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info b/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
index dfc023e7..86cd3220 100644
--- a/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
+++ b/drupal7/sites/all/modules/ctools/tests/ctools_export_test/ctools_export_test.info
@@ -2,14 +2,15 @@ name = CTools export test
 description = CTools export test module
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 dependencies[] = ctools
 hidden = TRUE
 
 files[] = ctools_export.test
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info b/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
index 955f2063..f2b5cc89 100644
--- a/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
+++ b/drupal7/sites/all/modules/ctools/tests/ctools_plugin_test.info
@@ -1,6 +1,7 @@
 name = Chaos tools plugins test
 description = Provides hooks for testing ctools plugins.
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 core = 7.x
 dependencies[] = ctools
 files[] = ctools.plugins.test
@@ -11,9 +12,9 @@ files[] = math_expression.test
 files[] = math_expression_stack.test
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc b/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc
index 262d81de..bb413d5b 100644
--- a/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc
+++ b/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views.inc
@@ -63,18 +63,6 @@ function views_content_views_content_type_content_types($plugin) {
   return $types;
 }
 
-/**
- * Return a single content type.
- */
-function views_content_views_content_type_content_type($subtype, $plugin) {
-  $view = views_get_view($name);
-  if (empty($view)) {
-    return;
-  }
-
-  return _views_content_views_content_type($view);
-}
-
 /**
  * Create the content type info array to give back to ctools for a given display.
  */
diff --git a/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc b/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
index b77404e6..dc61bca9 100644
--- a/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
+++ b/drupal7/sites/all/modules/ctools/views_content/plugins/content_types/views_panes.inc
@@ -274,6 +274,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
   }
 
   if ($allow['exposed_form'] && !empty($conf['exposed'])) {
+    foreach ($conf['exposed'] as $filter_name => $filter_value) {
+      if (!is_array($filter_value)) {
+        $conf['exposed'][$filter_name] = ctools_context_keyword_substitute($filter_value, array(), $contexts);
+      }
+    }
     $view->set_exposed_input($conf['exposed']);
   }
 
@@ -284,6 +289,11 @@ function views_content_views_panes_content_type_render($subtype, $conf, $panel_a
     return;
   }
 
+  // Add contextual links to the output.
+  $block = (array) $block;
+  views_add_block_contextual_links($block, $view, $display, 'panel_pane');
+  $block = (object) $block;
+
   $block->title = $view->get_title();
 
   if (empty($view->total_rows) || $view->total_rows <= $view->get_items_per_page()) {
@@ -313,7 +323,7 @@ function views_content_views_panes_add_defaults(&$conf, $view) {
 
   $conf += array(
     'link_to_view' => $view->display_handler->get_option('link_to_view'),
-    'more_link' => $view->display_handler->get_option('more_link'),
+    'more_link' => $view->display_handler->get_option('use_more'),
     'feed_icons' => FALSE,
     'use_pager' => $pager['type'] != 'none' && $pager['type'] != 'some',
     'pager_id' => isset($pager['options']['id']) ? $pager['options']['id'] : 0,
@@ -408,7 +418,7 @@ function views_content_views_panes_content_type_edit_form($form, &$form_state) {
       $form['fields_override'][$field] = array(
         '#type' => 'checkbox',
         '#title' => $title,
-        '#default_value' => isset($conf['fields_override'][$field]) ? $conf['fields_override'][$field] : TRUE,
+        '#default_value' => isset($conf['fields_override'][$field]) ? $conf['fields_override'][$field] : !$handler->options['exclude'],
       );
     }
   }
@@ -602,7 +612,7 @@ function views_content_views_panes_content_type_admin_info($subtype, $conf, $con
     $argument_input = $view->display_handler->get_option('argument_input');
 
     foreach ($conf['arguments'] as $key => $value) {
-      if(!empty($value)){
+      if (!empty($value)){
         $label = $argument_input[$key]['label'];
         $info[] = $label . ': ' . $value;
       }
diff --git a/drupal7/sites/all/modules/ctools/views_content/plugins/relationships/term_from_view.inc b/drupal7/sites/all/modules/ctools/views_content/plugins/relationships/term_from_view.inc
index bdd25b85..fc9e20d4 100644
--- a/drupal7/sites/all/modules/ctools/views_content/plugins/relationships/term_from_view.inc
+++ b/drupal7/sites/all/modules/ctools/views_content/plugins/relationships/term_from_view.inc
@@ -13,7 +13,7 @@ $plugin = array(
   'title' => t('Term from view'),
   'keyword' => 'term',
   'description' => t('Extract a term context from a view context of the base type term.'),
-  'required context' => new ctools_context_required(t('View'), 'view', array('base' => 'term_data')),
+  'required context' => new ctools_context_required(t('View'), 'view', array('base' => 'taxonomy_term_data')),
   'context' => 'views_content_term_from_view_context',
   'edit form' => 'views_content_term_from_view_settings_form',
   'edit form validate' => 'views_content_term_from_view_settings_form_validate',
@@ -26,7 +26,7 @@ $plugin = array(
 function views_content_term_from_view_context($context, $conf, $placeholder = FALSE) {
   // If unset it wants a generic, unfilled context, which is just NULL.
   if (empty($context->data) || $placeholder) {
-    return ctools_context_create_empty('term', NULL);
+    return ctools_context_create_empty('entity:taxonomy_term', NULL);
   }
   $view = views_content_context_get_view($context);
   // Ensure the view executes, but we don't need its output.
@@ -36,11 +36,11 @@ function views_content_term_from_view_context($context, $conf, $placeholder = FA
   if (isset($view->result[$row])) {
     $tid = $view->result[$row]->{$view->base_field};
     if ($tid) {
-      $term = taxonomy_get_term($tid);
-      return ctools_context_create('term', $term);
+      $term = taxonomy_term_load($tid);
+      return ctools_context_create('entity:taxonomy_term', $term);
     }
   }
-  return ctools_context_create_empty('term', NULL);
+  return ctools_context_create_empty('entity:taxonomy_term', NULL);
 }
 
 /**
diff --git a/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content.views.inc b/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content.views.inc
index 6724d3c5..644ac547 100644
--- a/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content.views.inc
+++ b/drupal7/sites/all/modules/ctools/views_content/plugins/views/views_content.views.inc
@@ -25,6 +25,7 @@ function views_content_views_plugins() {
         'use more' => TRUE,
         'accept attachments' => TRUE,
         'help topic' => 'display-pane',
+        'contextual links locations' => array('panel_pane'),
       ),
       'ctools_context' => array(
         'title' => t('Context'),
diff --git a/drupal7/sites/all/modules/ctools/views_content/views_content.info b/drupal7/sites/all/modules/ctools/views_content/views_content.info
index 2d67e974..be820842 100644
--- a/drupal7/sites/all/modules/ctools/views_content/views_content.info
+++ b/drupal7/sites/all/modules/ctools/views_content/views_content.info
@@ -5,13 +5,14 @@ dependencies[] = ctools
 dependencies[] = views
 core = 7.x
 package = Chaos tool suite
+version = CTOOLS_MODULE_VERSION
 files[] = plugins/views/views_content_plugin_display_ctools_context.inc
 files[] = plugins/views/views_content_plugin_display_panel_pane.inc
 files[] = plugins/views/views_content_plugin_style_ctools_context.inc
 
-; Information added by Drupal.org packaging script on 2014-11-19
-version = "7.x-1.5"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.6"
 core = "7.x"
 project = "ctools"
-datestamp = "1416423525"
+datestamp = "1422471484"
 
diff --git a/drupal7/sites/all/modules/ctools/views_content/views_content.module b/drupal7/sites/all/modules/ctools/views_content/views_content.module
index e5074f5f..27a666ae 100644
--- a/drupal7/sites/all/modules/ctools/views_content/views_content.module
+++ b/drupal7/sites/all/modules/ctools/views_content/views_content.module
@@ -281,3 +281,17 @@ function _views_content_get_context_from_display($view, $id, $parent, $required
     'view display id' => $id,
   );
 }
+
+/**
+ * Implements hook_get_pane_links_alter().
+ */
+function views_content_get_pane_links_alter(&$links, $pane, $content_type) {
+  if ($pane->type === 'views_panes') {
+    list($view_name, $display_name) = explode('-', $pane->subtype);
+    $destination = array('destination' => current_path());
+    $links['top'][] = array(
+      'title' => t('Edit view'),
+      'href' => url('admin/structure/views/view/' . $view_name . '/edit/' . $display_name, array('query' => $destination, 'absolute' => TRUE)),
+    );
+  }
+}
diff --git a/drupal7/sites/all/modules/i18n/i18n.info b/drupal7/sites/all/modules/i18n/i18n.info
index cbc64cc6..d4f5c430 100644
--- a/drupal7/sites/all/modules/i18n/i18n.info
+++ b/drupal7/sites/all/modules/i18n/i18n.info
@@ -8,9 +8,9 @@ files[] = i18n_object.inc
 files[] = i18n.test
 configure = admin/config/regional/i18n
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n.module b/drupal7/sites/all/modules/i18n/i18n.module
index e94dd83b..b65061dc 100644
--- a/drupal7/sites/all/modules/i18n/i18n.module
+++ b/drupal7/sites/all/modules/i18n/i18n.module
@@ -403,9 +403,17 @@ function i18n_get_object($type, $key, $object = NULL) {
   $index = is_array($key) ? implode(':', $key) : $key;
   if (!isset($cache[$type][$index])) {
     $class = i18n_object_info($type, 'class', 'i18n_object_wrapper');
-    $cache[$type][$index] = new $class($type, $key, $object);
+    $object_wrapper = new $class($type, $key, $object);
+    // Do not cache object with empty index.
+    if (!empty($index)) {
+      $cache[$type][$index] = $object_wrapper;
+    }
+  }
+  else {
+    $object_wrapper = $cache[$type][$index];
   }
-  return $cache[$type][$index];
+
+  return $object_wrapper;
 }
 
 /**
diff --git a/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.info b/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.info
index bf910a1d..0e599035 100644
--- a/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.info
+++ b/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.info
@@ -8,9 +8,9 @@ files[] = i18n_block.inc
 files[] = i18n_block.test
 
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.module b/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.module
index 94619008..5328a5fc 100644
--- a/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.module
+++ b/drupal7/sites/all/modules/i18n/i18n_block/i18n_block.module
@@ -59,7 +59,7 @@ function i18n_block_menu_alter(&$items) {
  */
 function i18n_block_translate_tab_access($module, $delta) {
   $block = block_load($module, $delta);
-  return user_access('translate interface') && isset($block) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
+  return user_access('translate interface') && $block && isset($block->i18n_mode) && ($block->i18n_mode == I18N_MODE_LOCALIZE);
 }
 
 /**
diff --git a/drupal7/sites/all/modules/i18n/i18n_contact/i18n_contact.info b/drupal7/sites/all/modules/i18n/i18n_contact/i18n_contact.info
index be25cb64..7bad71d2 100644
--- a/drupal7/sites/all/modules/i18n/i18n_contact/i18n_contact.info
+++ b/drupal7/sites/all/modules/i18n/i18n_contact/i18n_contact.info
@@ -5,9 +5,9 @@ dependencies[] = i18n_string
 package = Multilingual - Internationalization
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.info b/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.info
index 6e2119ba..552eb392 100644
--- a/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.info
+++ b/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.info
@@ -6,9 +6,9 @@ package = Multilingual - Internationalization
 core = 7.x
 files[] = i18n_field.inc
 files[] = i18n_field.test
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.module b/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.module
index b6823975..eadd2f5c 100644
--- a/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.module
+++ b/drupal7/sites/all/modules/i18n/i18n_field/i18n_field.module
@@ -248,13 +248,13 @@ function i18n_field_field_widget_form_alter(&$element, &$form_state, $context) {
       if ($filefield && $single_value && $no_default) {
         $help_variables = array(
           'description' => field_filter_xss($instance['description']),
-          'upload_validators' => $alter_element['#upload_validators'],
+          'upload_validators' => isset($alter_element['#upload_validators']) ? $alter_element['#upload_validators'] : array(),
         );
         $original_description = theme('file_upload_help', $help_variables);
         if ($alter_element['#description'] == $original_description) {
           $help_variables = array(
             'description' => field_filter_xss($instance_current['description']),
-            'upload_validators' => $alter_element['#upload_validators'],
+            'upload_validators' => isset($alter_element['#upload_validators']) ? $alter_element['#upload_validators'] : array(),
           );
           $alter_element['#description'] = theme('file_upload_help', $help_variables);
         }
@@ -403,7 +403,9 @@ function i18n_field_translate_allowed_values($field, $langcode = NULL) {
  * Translate field default.
  */
 function i18n_field_translate_default($instance, $value, $langcode = NULL) {
-  return i18n_string_translate(array('field', $instance['field_name'], $instance['bundle'], 'default_value'), $value, array('langcode' => $langcode));
+  // The default value does not need sanitizing in a text_textfield widget.
+  $sanitize = !($instance['widget']['type'] == 'text_textfield' && $instance['widget']['module'] == 'text');
+  return i18n_string_translate(array('field', $instance['field_name'], $instance['bundle'], 'default_value'), $value, array('langcode' => $langcode, 'sanitize' => $sanitize));
 }
 
 /**
diff --git a/drupal7/sites/all/modules/i18n/i18n_forum/i18n_forum.info b/drupal7/sites/all/modules/i18n/i18n_forum/i18n_forum.info
index b44a7aab..afd96583 100644
--- a/drupal7/sites/all/modules/i18n/i18n_forum/i18n_forum.info
+++ b/drupal7/sites/all/modules/i18n/i18n_forum/i18n_forum.info
@@ -7,9 +7,9 @@ package = Multilingual - Internationalization
 core = 7.x
 files[] = i18n_forum.test
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.info b/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.info
index b3537736..7a6821c7 100644
--- a/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.info
+++ b/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.info
@@ -10,9 +10,9 @@ core = 7.x
 files[] = i18n_menu.inc
 files[] = i18n_menu.test
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.module b/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.module
index ab857929..8bcf6796 100644
--- a/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.module
+++ b/drupal7/sites/all/modules/i18n/i18n_menu/i18n_menu.module
@@ -530,7 +530,7 @@ function _i18n_menu_link_process(&$link) {
       }
     }
     // Skip if administering this menu item through the node edit form.
-    elseif (arg(0) == 'node' && arg(2) == 'edit') {
+    elseif (arg(0) == 'node' && arg(2) == 'edit' && $link['link_path'] == arg(0) . '/' . arg(1)) {
       return FALSE;
     }
     return TRUE;
diff --git a/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.info b/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.info
index 9b851057..4522510e 100644
--- a/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.info
+++ b/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.info
@@ -9,9 +9,9 @@ configure = admin/config/regional/i18n/node
 files[]=i18n_node.test
 files[]=i18n_node.variable.inc
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.tokens.inc b/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.tokens.inc
new file mode 100644
index 00000000..dc05a009
--- /dev/null
+++ b/drupal7/sites/all/modules/i18n/i18n_node/i18n_node.tokens.inc
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * @file
+ * Builds placeholder replacement tokens for content types.
+ */
+
+/**
+ * Implements hook_token_info().
+ */
+function i18n_node_token_info() {
+  $content_type['i18n-name'] = array(
+    'name' => t("Name (localized)"),
+    'description' => t("The name of the content type."),
+  );
+  $content_type['i18n-description'] = array(
+    'name' => t("Description (localized)"),
+    'description' => t("The optional description of the content type."),
+  );
+
+  return array(
+    'tokens' => array(
+      'content-type' => $content_type,
+    ),
+  );
+}
+
+/**
+ * Implements hook_tokens().
+ */
+function i18n_node_tokens($type, $tokens, array $data = array(), array $options = array()) {
+  $replacements = array();
+  $sanitize = !empty($options['sanitize']) ? TRUE : FALSE;
+  $langcode = isset($options['language']) ? $options['language']->language : i18n_langcode();
+
+  if ($type == 'content-type' && !empty($data['node_type'])) {
+
+    $node_type = $data['node_type'];
+
+    foreach ($tokens as $name => $original) {
+      switch ($name) {
+
+        case 'i18n-name':
+          $name = array('node', 'type', $node_type->type, 'name');
+          $options = array('sanitize' => $sanitize, 'langcode' => $langcode);
+          $name = i18n_string_translate($name, $node_type->name, $options);
+          $replacements[$original] = $name;
+          break;
+
+        case 'i18n-description':
+          $description = array('node', 'type', $node_type->type, 'description');
+          $options = array('sanitize' => $sanitize, 'langcode' => $langcode);
+          $description = i18n_string_translate($description, $node_type->description, $options);
+          $replacements[$original] = $description;
+          break;
+      }
+    }
+  }
+
+  return $replacements;
+}
diff --git a/drupal7/sites/all/modules/i18n/i18n_path/i18n_path.info b/drupal7/sites/all/modules/i18n/i18n_path/i18n_path.info
index 1df91724..10f62e7c 100644
--- a/drupal7/sites/all/modules/i18n/i18n_path/i18n_path.info
+++ b/drupal7/sites/all/modules/i18n/i18n_path/i18n_path.info
@@ -6,9 +6,9 @@ core = 7.x
 
 files[] = i18n_path.inc
 files[] = i18n_path.test
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_redirect/i18n_redirect.info b/drupal7/sites/all/modules/i18n/i18n_redirect/i18n_redirect.info
index 9faba242..6f6ee43d 100644
--- a/drupal7/sites/all/modules/i18n/i18n_redirect/i18n_redirect.info
+++ b/drupal7/sites/all/modules/i18n/i18n_redirect/i18n_redirect.info
@@ -4,9 +4,9 @@ dependencies[] = i18n
 package = Multilingual - Internationalization
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.info b/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.info
index fa849d29..7c47197f 100644
--- a/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.info
+++ b/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.info
@@ -6,9 +6,9 @@ core = 7.x
 configure = admin/config/regional/i18n/select
 files[] = i18n_select.test
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.module b/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.module
index 4ba44886..bcba5782 100644
--- a/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.module
+++ b/drupal7/sites/all/modules/i18n/i18n_select/i18n_select.module
@@ -223,7 +223,7 @@ function _i18n_select_table_alias($table) {
 function i18n_select_check_conditions($query, $table_alias = NULL) {
   $conditions =& $query->conditions();
   foreach ($conditions as $index => $condition) {
-    if (is_array($condition) && isset($condition['field'])) {
+    if (is_array($condition) && !empty($condition['field'])) {
       if (strpos($condition['field'], '.') === FALSE) {
         if ($table_alias) {
           // Change the condition to include a table alias.
diff --git a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.inc b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.inc
index 38df8c2a..33fa444d 100644
--- a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.inc
+++ b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.inc
@@ -166,7 +166,7 @@ class i18n_string_object {
    * Get translation to language from string object
    */
   public function get_translation($langcode) {
-    if (empty($this->translations[$langcode])) {
+    if (!isset($this->translations[$langcode])) {
       $translation = $this->textgroup()->load_translation($this, $langcode);
       if ($translation && isset($translation->translation)) {
         $this->set_translation($translation, $langcode);
@@ -1234,7 +1234,7 @@ class i18n_string_object_wrapper extends i18n_object_wrapper {
    */
   public function translate($langcode, $options = array()) {
     // We may have it already translated. As objects are statically cached, translations are too.
-    if (empty($this->translations[$langcode])) {
+    if (!isset($this->translations[$langcode])) {
       $this->translations[$langcode] = $this->translate_object($langcode, $options);
     }
     return $this->translations[$langcode];
diff --git a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.info b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.info
index e3bb69de..301a54ec 100644
--- a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.info
+++ b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.info
@@ -10,9 +10,9 @@ files[] = i18n_string.inc
 files[] = i18n_string.test
 configure = admin/config/regional/i18n/strings
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.install b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.install
index 511bc8a2..100d7c04 100644
--- a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.install
+++ b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.install
@@ -28,6 +28,8 @@ function i18n_string_install() {
     i18n_string_update_7000();
     i18n_string_update_7001();
   }
+  // Create new index in {locales_source}, performance improvement in sites with i18n.
+  db_add_index('locales_source', 'textgroup_context', array('textgroup', 'context'));
 }
 
 /**
@@ -36,6 +38,8 @@ function i18n_string_install() {
 function i18n_string_uninstall() {
   // Drop custom field.
   db_drop_field('locales_target', 'i18n_status');
+  // Drop custom index in locales_source table
+  db_drop_index('locales_source', 'textgroup_context');
 }
 
 /**
@@ -230,6 +234,14 @@ function i18n_string_update_7001() {
   }
 }
 
+/**
+ *  Create new index in {locales_source}, performance improvement in sites with i18n.
+ */
+function i18n_string_update_7002() {
+  db_add_index('locales_source', 'textgroup_context', array('textgroup', 'context'));
+}
+
+
 /**
  * Notes for update script
  */
diff --git a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.pages.inc b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.pages.inc
index eb4d8b66..4d0da59c 100644
--- a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.pages.inc
+++ b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.pages.inc
@@ -398,8 +398,9 @@ function i18n_string_locale_translate_edit_form_submit($form, &$form_state) {
   // Invoke locale submission.
   locale_translate_edit_form_submit($form, $form_state);
   $lid = $form_state['values']['lid'];
-  $i18n_string_object = i18n_string_get_by_lid($lid);
-  $i18n_string_object->cache_reset();
+  if ($i18n_string_object = i18n_string_get_by_lid($lid)) {
+    $i18n_string_object->cache_reset();
+  }
   foreach ($form_state['values']['translations'] as $key => $value) {
     if (!empty($value)) {
       // An update has been made, so we assume the translation is now current.
diff --git a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.test b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.test
index 2b8cd15a..f11c7564 100644
--- a/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.test
+++ b/drupal7/sites/all/modules/i18n/i18n_string/i18n_string.test
@@ -120,6 +120,38 @@ class i18nStringTestCase extends Drupali18nTestCase {
         $this->assertText($string_cache->data['string']);
       }
     }
+
+    // Test that un-translated strings are cached correctly.
+    $textgroup = 'test_cached';
+    $key = 3;
+    $string = self::randomName(100);
+    $name = "$textgroup:item:$key:title";
+    i18n_string_update($name, $string);
+
+    // Generate the cache entry.
+    $string_object = i18n_string_build($name, $string);
+    $langcode = i18n_langcode();
+    $string_object->get_translation($langcode);
+
+    // Destroy the textgroup object to write the cache entry.
+    $textgroup_object = i18n_string_textgroup($textgroup);
+    $textgroup_object->__destruct();
+    $this->assertTrue(cache_get($string_object->get_cid()) !== FALSE, "Cache entry created.");
+    drupal_static_reset('i18n_string_textgroup');
+
+    // Reset the loaded translation variable.
+    variable_del('i18n_loaded_translations');
+    $loaded_translations = variable_get('i18n_loaded_translations', array());
+    $this->verbose(var_export($loaded_translations, TRUE));
+
+    // Rebuild the string.
+    $string_object = i18n_string_build($name, $string);
+    $string_object->get_translation($langcode);
+
+    // Check that the string hasn't been loaded.
+    $loaded_translations = variable_get('i18n_loaded_translations', array());
+    $this->verbose(var_export($loaded_translations, TRUE));
+    $this->assertFalse(isset($loaded_translations['test_cached:item:3:title']), "The untranslated string was correctly cached.");
   }
 
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.info b/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.info
index 395ab049..2f1cd55e 100644
--- a/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.info
+++ b/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.info
@@ -10,9 +10,9 @@ files[] = i18n_sync.install
 files[] = i18n_sync.module.inc
 files[] = i18n_sync.node.inc
 files[] = i18n_sync.test
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.module b/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.module
index 8720e790..8aaadbec 100644
--- a/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.module
+++ b/drupal7/sites/all/modules/i18n/i18n_sync/i18n_sync.module
@@ -11,8 +11,6 @@
  *
  * Notes:
  * This module needs to run after taxonomy, i18n, translation. Check module weight.
- *
- * @ TODO Test with CCK when possible, api may have changed.
  */
 
 /**
@@ -71,15 +69,6 @@ function i18n_sync_field_info_alter(&$fields) {
   }
 }
 
-/**
- * Implements hook_form_FORM_ID_alter().
- */
-function i18n_sync_form_node_admin_content_alter(&$form, &$form_state) {
-  if (!empty($form['operation']) && $form['operation']['#value'] == 'delete') {
-    $form['#submit'] = array_merge(array('i18n_sync_node_delete_submit'), $form['#submit']);
-  }
-}
-
 /**
  * Implements hook_form_FORM_ID_alter().
  */
diff --git a/drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.info b/drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.info
index 2ca2bddb..2412c40e 100644
--- a/drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.info
+++ b/drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.info
@@ -11,9 +11,9 @@ files[] = i18n_taxonomy.pages.inc
 files[] = i18n_taxonomy.admin.inc
 files[] = i18n_taxonomy.test
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_translation/i18n_translation.info b/drupal7/sites/all/modules/i18n/i18n_translation/i18n_translation.info
index aa340324..190173c5 100644
--- a/drupal7/sites/all/modules/i18n/i18n_translation/i18n_translation.info
+++ b/drupal7/sites/all/modules/i18n/i18n_translation/i18n_translation.info
@@ -6,9 +6,9 @@ core = 7.x
 
 files[] = i18n_translation.inc
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_user/i18n_user.info b/drupal7/sites/all/modules/i18n/i18n_user/i18n_user.info
index 3d462330..7c6ee3ba 100644
--- a/drupal7/sites/all/modules/i18n/i18n_user/i18n_user.info
+++ b/drupal7/sites/all/modules/i18n/i18n_user/i18n_user.info
@@ -4,9 +4,9 @@ core = 7.x
 package = Multilingual - Internationalization
 dependencies[] = i18n_variable
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/i18n_variable/i18n_variable.info b/drupal7/sites/all/modules/i18n/i18n_variable/i18n_variable.info
index 14edd316..6956a25d 100644
--- a/drupal7/sites/all/modules/i18n/i18n_variable/i18n_variable.info
+++ b/drupal7/sites/all/modules/i18n/i18n_variable/i18n_variable.info
@@ -10,9 +10,9 @@ configure = admin/config/regional/i18n/variable
 files[] = i18n_variable.class.inc
 files[] = i18n_variable.test
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/tests/i18n_test.info b/drupal7/sites/all/modules/i18n/tests/i18n_test.info
index 9f9f4ed9..9ccf441d 100644
--- a/drupal7/sites/all/modules/i18n/tests/i18n_test.info
+++ b/drupal7/sites/all/modules/i18n/tests/i18n_test.info
@@ -7,9 +7,9 @@ package = Testing
 core = 6.x
 hidden = TRUE
 
-; Information added by Drupal.org packaging script on 2014-04-16
-version = "7.x-1.11"
+; Information added by Drupal.org packaging script on 2015-01-26
+version = "7.x-1.12"
 core = "7.x"
 project = "i18n"
-datestamp = "1397666996"
+datestamp = "1422286982"
 
diff --git a/drupal7/sites/all/modules/i18n/tests/i18n_test.module b/drupal7/sites/all/modules/i18n/tests/i18n_test.module
index 6ece0388..0d72729a 100644
--- a/drupal7/sites/all/modules/i18n/tests/i18n_test.module
+++ b/drupal7/sites/all/modules/i18n/tests/i18n_test.module
@@ -40,7 +40,7 @@ function i18n_test_i18n_string_info() {
     'title' => t('Test Cached Strings'),
     'description' => t('Translatable items of a textgroup with caching enabled.'),
     'format' => FALSE, // This group doesn't have strings with format
-    'class' => 'i18n_string_textgroup_cached',
+    'class' => 'i18n_string_textgroup_cached_logged',
   );
   return $groups;
 }
@@ -89,4 +89,13 @@ function i18n_test_menu() {
     'delivery callback' => 'drupal_json_output',
   );
   return $items;
+}
+
+class i18n_string_textgroup_cached_logged extends i18n_string_textgroup_cached {
+  public static function load_translation($i18nstring, $langcode) {
+    $strings = variable_get('i18n_loaded_translations', array());
+    $strings[$i18nstring->get_name()] = true;
+    variable_set('i18n_loaded_translations', $strings);
+    parent::load_translation($i18nstring, $langcode);
+  }
 }
\ No newline at end of file
diff --git a/drupal7/sites/all/modules/jquery_update/jquery_update.info b/drupal7/sites/all/modules/jquery_update/jquery_update.info
index e328ba72..7517c48e 100644
--- a/drupal7/sites/all/modules/jquery_update/jquery_update.info
+++ b/drupal7/sites/all/modules/jquery_update/jquery_update.info
@@ -7,9 +7,9 @@ files[] = jquery_update.install
 
 configure = admin/config/development/jquery_update
 
-; Information added by Drupal.org packaging script on 2014-04-02
-version = "7.x-2.4"
+; Information added by Drupal.org packaging script on 2015-01-25
+version = "7.x-2.5"
 core = "7.x"
 project = "jquery_update"
-datestamp = "1396482246"
+datestamp = "1422221882"
 
diff --git a/drupal7/sites/all/modules/jquery_update/jquery_update.install b/drupal7/sites/all/modules/jquery_update/jquery_update.install
index e167a230..3633ddde 100644
--- a/drupal7/sites/all/modules/jquery_update/jquery_update.install
+++ b/drupal7/sites/all/modules/jquery_update/jquery_update.install
@@ -18,7 +18,7 @@ function jquery_update_requirements($phase) {
     $requirements['jquery_update'] = array(
       'title' => $t('jQuery Update'),
       'severity' => REQUIREMENT_OK,
-      'value' => t('jQuery %jquery and jQuery UI %ui', array('%jquery' => $jquery['version'], '%ui' => $ui['version'])),
+      'value' => t('jQuery %jquery (<a href="@link">configure</a>) and jQuery UI %ui', array('%jquery' => $jquery['version'], '%ui' => $ui['version'], '@link' => url('admin/config/development/jquery_update'))),
     );
   }
 
diff --git a/drupal7/sites/all/modules/jquery_update/jquery_update.module b/drupal7/sites/all/modules/jquery_update/jquery_update.module
index 47b447f9..956c9e5a 100644
--- a/drupal7/sites/all/modules/jquery_update/jquery_update.module
+++ b/drupal7/sites/all/modules/jquery_update/jquery_update.module
@@ -94,6 +94,13 @@ function jquery_update_library_alter(&$javascript, $module) {
         $version = $admin_version;
       }
     }
+    // If the ajax version is set then that one always win.
+    if (!empty($_POST['ajax_page_state']['jquery_version'])) {
+      $ajax_version = $_POST['ajax_page_state']['jquery_version'];
+      if (in_array($ajax_version, array('default', '1.5', '1.6', '1.7', '1.8', '1.9', '1.10'))) {
+        $version = $ajax_version;
+      }
+    }
 
     // Always add a new jquery_version array to ajaxPageState.
     // This is what we used to determine which version to use
@@ -103,6 +110,12 @@ function jquery_update_library_alter(&$javascript, $module) {
       'type' => 'setting',
     );
     $javascript['drupal.ajax']['dependencies'][] = array('jquery_update', 'jquery_update.ajax.fix');
+
+    // Don't replace anything if Drupal provided jQuery should be used
+    if ('default' == $version) {
+      return;
+    }
+
     jquery_update_jquery_replace($javascript, $cdn, $path, $min, $version);
 
     // Replace jQuery UI with CDN or local files. If from a CDN include all of
@@ -163,6 +176,7 @@ function jquery_update_settings_form() {
     '#type' => 'select',
     '#title' => t('Default jQuery Version'),
     '#options' => array(
+      'default' => t('Default (provided by Drupal)'),
       '1.5' => '1.5',
       '1.7' => '1.7',
       '1.8' => '1.8',
@@ -177,7 +191,8 @@ function jquery_update_settings_form() {
     '#type' => 'select',
     '#title' => t('Alternate jQuery version for administrative pages'),
     '#options' => array(
-      '' => t('Use the default'),
+      '' => t('Default jQuery Version'),
+      'default' => t('Default (provided by Drupal)'),
       '1.5' => '1.5',
       '1.7' => '1.7',
       '1.8' => '1.8',
@@ -194,6 +209,12 @@ function jquery_update_settings_form() {
       'min' => t('Production (minified)'),
       'none' => t('Development (uncompressed)'),
     ),
+    // Do not show this field if jQuery version is default
+    '#states' => array(
+      'invisible' => array(
+        ':input[name=jquery_update_jquery_version]' => array('value' => "default"),
+      ),
+    ),
     '#default_value' => variable_get('jquery_update_compression_type', 'min'),
   );
   $form['jquery_update_jquery_cdn'] = array(
@@ -205,6 +226,12 @@ function jquery_update_settings_form() {
       'microsoft' => t('Microsoft'),
       'jquery' => t('jQuery'),
     ),
+    // Do not show this field if jQuery version is default
+    '#states' => array(
+      'invisible' => array(
+        ':input[name=jquery_update_jquery_version]' => array('value' => "default"),
+      ),
+    ),
     '#default_value' => variable_get('jquery_update_jquery_cdn', 'none'),
     '#description' => t('Use jQuery and jQuery UI from a CDN. If the CDN is not available the local version of jQuery and jQuery UI will be used.'),
   );
@@ -231,13 +258,6 @@ function jquery_update_settings_form() {
  *   The version of jQuery to use.
  */
 function jquery_update_jquery_replace(&$javascript, $cdn, $path, $min, $version) {
-  // If the ajax version is set then that one always win.
-  if (!empty($_POST['ajax_page_state']['jquery_version'])) {
-    $ajax_version = $_POST['ajax_page_state']['jquery_version'];
-    if (in_array($ajax_version, array('1.5', '1.6', '1.7', '1.8', '1.9', '1.10'))) {
-      $version = $ajax_version;
-    }
-  }
 
   // Make sure to use the latest version in given branch.
   $trueversion = NULL;
@@ -267,19 +287,19 @@ function jquery_update_jquery_replace(&$javascript, $cdn, $path, $min, $version)
   // Check for CDN support.
   switch ($cdn) {
     case 'google':
-      $javascript['jquery']['js']['misc/jquery.js']['data'] = 'https://ajax.googleapis.com/ajax/libs/jquery/' . $trueversion . '/jquery' . $min . '.js';
+      $javascript['jquery']['js']['misc/jquery.js']['data'] = '//ajax.googleapis.com/ajax/libs/jquery/' . $trueversion . '/jquery' . $min . '.js';
       $javascript['jquery']['js']['misc/jquery.js']['type'] = 'external';
       jquery_update_jquery_backup($javascript, $path, $min, $version);
       break;
 
     case 'microsoft':
-      $javascript['jquery']['js']['misc/jquery.js']['data'] = 'http://ajax.aspnetcdn.com/ajax/jQuery/jquery-' . $trueversion . $min . '.js';
+      $javascript['jquery']['js']['misc/jquery.js']['data'] = '//ajax.aspnetcdn.com/ajax/jQuery/jquery-' . $trueversion . $min . '.js';
       $javascript['jquery']['js']['misc/jquery.js']['type'] = 'external';
       jquery_update_jquery_backup($javascript, $path, $min, $version);
       break;
 
     case 'jquery':
-      $javascript['jquery']['js']['misc/jquery.js']['data'] = 'http://code.jquery.com/jquery-' . $trueversion . $min . '.js';
+      $javascript['jquery']['js']['misc/jquery.js']['data'] = '//code.jquery.com/jquery-' . $trueversion . $min . '.js';
       $javascript['jquery']['js']['misc/jquery.js']['type'] = 'external';
       jquery_update_jquery_backup($javascript, $path, $min, $version);
       break;
@@ -377,22 +397,26 @@ function jquery_update_jqueryui_replace(&$javascript, $cdn, $path, $min) {
     'ui.accordion', 'ui.autocomplete', 'ui.button', 'ui.datepicker', 'ui.dialog', 'ui.draggable',
     'ui.droppable', 'ui.mouse', 'ui.position', 'ui.progressbar', 'ui.resizable', 'ui.selectable',
     'ui.slider', 'ui.sortable', 'ui.tabs', 'ui.widget', 'ui.spinner', 'ui.menu', 'ui.tooltip',
-    'effects.blind', 'effects.bounce', 'effects.clip', 'effects.drop', 'effects.explode', 'effects.fade',
-    'effects.fold', 'effects.highlight', 'effects.pulsate', 'effects.scale', 'effects.shake', 'effects.slide',
-    'effects.transfer',
   ));
   $names['ui'] = 'ui.core';
-  $names['effects'] = 'ui.effect';
+  $names['effects'] = array('effects.core', 'ui.effect'); // map[library_hook] = array(core_fn, updated_fn)
+  $names = jquery_update_make_library_hook_to_file_name_segment_map_for_effects($names);
 
   switch ($cdn) {
     case 'google':
-      $cdn = 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui' . $min . '.js';
+      $cdn = '//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui' . $min . '.js';
       jquery_update_jqueryui_cdn($cdn, $javascript, $path, $min, $names);
       jquery_update_jqueryui_backup($javascript, $path, $min);
       break;
 
     case 'microsoft':
-      $cdn = 'http://ajax.aspnetcdn.com/ajax/jquery.ui/1.10.2/jquery-ui' . $min . '.js';
+      $cdn = '//ajax.aspnetcdn.com/ajax/jquery.ui/1.10.2/jquery-ui' . $min . '.js';
+      jquery_update_jqueryui_cdn($cdn, $javascript, $path, $min, $names);
+      jquery_update_jqueryui_backup($javascript, $path, $min);
+      break;
+
+    case 'jquery':
+      $cdn = '//code.jquery.com/ui/1.10.2/jquery-ui' . $min . '.js';
       jquery_update_jqueryui_cdn($cdn, $javascript, $path, $min, $names);
       jquery_update_jqueryui_backup($javascript, $path, $min);
       break;
@@ -403,6 +427,30 @@ function jquery_update_jqueryui_replace(&$javascript, $cdn, $path, $min) {
   }
 }
 
+/**
+ * Create a mapping from system.module library hooks to file name segments.
+ *
+ * @param array $map Optional. If given, append to it.
+ * @return array The keys are library hooks  and the values are each arrays of
+ * 2 file name segments as values. The first file name segment can be used to
+ * reach Drupal core's jQuery UI effect files, and the second file name segment
+ * can be used to construct a path to the equivalent replacement
+ * jQuery UI effect file provided by jquery_update.module.
+ */
+function jquery_update_make_library_hook_to_file_name_segment_map_for_effects($map = array()) {
+  $effect_names = array(
+    'blind', 'bounce', 'clip', 'drop', 'explode', 'fade', 'fold',
+    'highlight', 'pulsate', 'scale', 'shake', 'slide', 'transfer',
+  );
+  foreach ($effect_names as $effect_name) {
+    $library_hook = 'effects.' . $effect_name;
+    $file_name_segment_core = $library_hook; // Yes, for the effect files, this is indeed identical.
+    $file_name_segment_updated = 'ui.effect-' . $effect_name;
+    $map[$library_hook] = array($file_name_segment_core, $file_name_segment_updated);
+  }
+  return $map;
+}
+
 /**
  * Add the local fallback in case jQuery UI from the CDN is unavailable.
  *
@@ -447,7 +495,8 @@ function jquery_update_jqueryui_cdn($cdn, &$javascript, $path, $min, $names) {
   // Construct the jQuery UI path and replace the JavaScript.
   $jspath = $path . '/replace/ui/ui/' . ($min == '.min' ? 'minified/' : '');
   foreach ($names as $name => $file) {
-    $corefile = 'misc/ui/jquery.' . $file . '.min.js';
+    list($file_core, $file_updated) = is_array($file) ? $file : array($file, $file);
+    $corefile = 'misc/ui/jquery.' . $file_core . '.min.js';
     // Remove the core files.
     unset($javascript[$name]['js'][$corefile]);
     $javascript[$name]['version'] = '1.10.2';
@@ -487,8 +536,9 @@ function jquery_update_jqueryui_local(&$javascript, $path, $min, $names) {
   // Construct the jQuery UI path and replace the JavaScript.
   $jspath = $path . '/replace/ui/ui/' . ($min == '.min' ? 'minified/' : '');
   foreach ($names as $name => $file) {
-    $corefile = 'misc/ui/jquery.' . $file . '.min.js';
-    $javascript[$name]['js'][$corefile]['data'] = $jspath . 'jquery.' . $file . $min . '.js';
+    list($file_core, $file_updated) = is_array($file) ? $file : array($file, $file);
+    $corefile = 'misc/ui/jquery.' . $file_core . '.min.js';
+    $javascript[$name]['js'][$corefile]['data'] = $jspath . 'jquery.' . $file_updated . $min . '.js';
     $javascript[$name]['version'] = '1.10.2';
   }
 }
diff --git a/drupal7/sites/all/modules/panels/css/panels_dnd.css b/drupal7/sites/all/modules/panels/css/panels_dnd.css
index 530b359d..20fad13e 100644
--- a/drupal7/sites/all/modules/panels/css/panels_dnd.css
+++ b/drupal7/sites/all/modules/panels/css/panels_dnd.css
@@ -175,7 +175,7 @@ div.panels-set-title-hide .panel-pane-is-title {
   margin: 0;
 }
 
-.panel-portlet .buttons input {
+.panel-portlet .buttons input, .panel-portlet .buttons button {
   margin: 0;
   padding: 0;
   display: inline;
@@ -369,22 +369,25 @@ a.close img {
   text-align: left;
 }
 
+.content-type-button a {
+  display: inline-block;
+  width: 100%;
+}
+
 .content-type-button img {
   border: 2px solid white;
-  float: left;
 }
 
 .content-type-button img:hover {
   border: 2px solid blue;
 }
 
-.content-type-button div {
+.content-type-button div,
+.content-type-button span {
   width: 85%;
+  position: relative;
   top: -5px;
-  left: 2px;
-  float: left;
-  padding-left: 3px;
-  padding-top: 5px;
+  left: 3px;
 }
 
 #panels-preview .modal-throbber-wrapper {
diff --git a/drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.info b/drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.info
index dc8bab0a..13838a1f 100644
--- a/drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.info
+++ b/drupal7/sites/all/modules/panels/i18n_panels/i18n_panels.info
@@ -7,9 +7,9 @@ dependencies[] = i18n_translation
 package = Multilingual - Internationalization
 core = 7.x
 
-; Information added by Drupal.org packaging script on 2014-02-12
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-3.5"
 core = "7.x"
 project = "panels"
-datestamp = "1392221614"
+datestamp = "1422472985"
 
diff --git a/drupal7/sites/all/modules/panels/includes/add-content.inc b/drupal7/sites/all/modules/panels/includes/add-content.inc
index 0a52ff92..dc0be48f 100644
--- a/drupal7/sites/all/modules/panels/includes/add-content.inc
+++ b/drupal7/sites/all/modules/panels/includes/add-content.inc
@@ -77,7 +77,10 @@ function template_preprocess_panels_add_content_link(&$vars) {
   $vars['description'] = isset($vars['content_type']['description']) ? $vars['content_type']['description'] : $vars['title'];
   $vars['icon'] = ctools_content_admin_icon($vars['content_type']);
   $vars['url'] = $vars['renderer']->get_url('add-pane', $vars['region'], $vars['content_type']['type_name'], $vars['content_type']['subtype_name']);
-
-  $vars['image_button'] = ctools_ajax_image_button($vars['icon'], $vars['url'], $vars['description'], 'panels-modal-add-config');
-  $vars['text_button'] = ctools_ajax_text_button($vars['title'], $vars['url'], $vars['description'], 'panels-modal-add-config');
+  $subtype_class = 'add-content-link-' . str_replace('_', '-', $vars['content_type']['subtype_name']);
+  $vars['image_button'] = ctools_ajax_image_button($vars['icon'], $vars['url'], $vars['description'], $subtype_class . '-image-button panels-modal-add-config');
+  $vars['text_button'] = ctools_ajax_text_button($vars['title'], $vars['url'], $vars['description'], $subtype_class . '-text-button panels-modal-add-config');
+  if (function_exists('ctools_ajax_icon_text_button')) {
+    $vars['icon_text_button'] = ctools_ajax_icon_text_button($vars['title'], $vars['icon'], $vars['url'], $vars['description'], $subtype_class . '-icon-text-button panels-modal-add-config');
+  }
 }
diff --git a/drupal7/sites/all/modules/panels/includes/display-edit.inc b/drupal7/sites/all/modules/panels/includes/display-edit.inc
index dc6d1b91..4e282924 100644
--- a/drupal7/sites/all/modules/panels/includes/display-edit.inc
+++ b/drupal7/sites/all/modules/panels/includes/display-edit.inc
@@ -240,7 +240,7 @@ function panels_edit_display_settings_form($form, &$form_state) {
       '#type' => 'textfield',
       '#default_value' => $display->title,
       '#title' => t('Title'),
-      '#description' => t('The title of this panel. If left blank, a default title may be used. Set to No Title if you want the title to actually be blank.'),
+      '#description' => t('The title of this panel. If left blank, a default title may be used. If you want the title actually to be blank, change the "Title type" dropdown from "Manually Set" to "No Title".'),
       '#process' => array('ctools_dependent_process'),
       '#dependency' => array('edit-display-title-hide-title' => array(PANELS_TITLE_FIXED)),
       '#maxlength' => 255,
diff --git a/drupal7/sites/all/modules/panels/includes/display-layout.inc b/drupal7/sites/all/modules/panels/includes/display-layout.inc
index ad051b45..b4687e2a 100644
--- a/drupal7/sites/all/modules/panels/includes/display-layout.inc
+++ b/drupal7/sites/all/modules/panels/includes/display-layout.inc
@@ -94,6 +94,7 @@ function panels_choose_layout($form, &$form_state) {
     }
   }
 
+  ctools_add_js('panels-base', 'panels');
   ctools_add_js('layout', 'panels');
 
   $form['categories'] = array(
diff --git a/drupal7/sites/all/modules/panels/js/display_editor.js b/drupal7/sites/all/modules/panels/js/display_editor.js
index 40e11463..53274f68 100644
--- a/drupal7/sites/all/modules/panels/js/display_editor.js
+++ b/drupal7/sites/all/modules/panels/js/display_editor.js
@@ -80,7 +80,7 @@ Drupal.Panels.Draggable = {
   regionId: 'panel-region-',
 
   // What to add to the front of a the id to get the form id for a panel
-  formId: 'input#edit-',
+  formId: '#edit-',
 
   maxWidth: 250,
 
@@ -492,8 +492,8 @@ Drupal.behaviors.PanelsDisplayEditor = {
     Drupal.Panels.Draggable.savePositions();
 
     // Bind buttons.
-    $('input#panels-hide-all', context).click(Drupal.Panels.clickHideAll);
-    $('input#panels-show-all', context).click(Drupal.Panels.clickShowAll);
+    $('#panels-hide-all', context).click(Drupal.Panels.clickHideAll);
+    $('#panels-show-all', context).click(Drupal.Panels.clickShowAll);
 
     Drupal.Panels.bindClickDelete(context);
 
@@ -513,6 +513,11 @@ Drupal.behaviors.PanelsDisplayEditor = {
         $('#panels-preview').html(html);
       });
 
+    // Bind modal detach behaviors to cancel current form.
+    $(document).bind('CToolsDetachBehaviors', function(event, context) {
+      $('#edit-cancel-style', context).trigger('click');
+    });
+
     var setTitleClass = function () {
       if ($('#edit-display-title-hide-title').val() == 2) {
         $('#panels-dnd-main').removeClass('panels-set-title-hide');
diff --git a/drupal7/sites/all/modules/panels/panels.info b/drupal7/sites/all/modules/panels/panels.info
index 797666f9..5eb4db15 100644
--- a/drupal7/sites/all/modules/panels/panels.info
+++ b/drupal7/sites/all/modules/panels/panels.info
@@ -2,17 +2,18 @@ name = Panels
 description = Core Panels display functions; provides no external UI, at least one other Panels module should be enabled.
 core = 7.x
 package = "Panels"
+version = PANELS_VERSION
 configure = admin/structure/panels
-dependencies[] = ctools (>=1.4)
+dependencies[] = ctools (>1.5)
 files[] = panels.module
 files[] = includes/common.inc
 files[] = includes/legacy.inc
 files[] = includes/plugins.inc
 files[] = plugins/views/panels_views_plugin_row_fields.inc
 
-; Information added by Drupal.org packaging script on 2014-02-12
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-3.5"
 core = "7.x"
 project = "panels"
-datestamp = "1392221614"
+datestamp = "1422472985"
 
diff --git a/drupal7/sites/all/modules/panels/panels.install b/drupal7/sites/all/modules/panels/panels.install
index b913012a..1d82544b 100644
--- a/drupal7/sites/all/modules/panels/panels.install
+++ b/drupal7/sites/all/modules/panels/panels.install
@@ -17,7 +17,7 @@ function panels_requirements_install() {
   // Assume that if the user is running an installation profile that both
   // Panels and CTools are the same release.
   if (!(defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install')) {
-    // apparently the install process doesn't include .module files,
+    // Apparently the install process doesn't include .module files,
     // so we need to force the issue in order for our versioning
     // check to work.
     if (!defined('PANELS_REQUIRED_CTOOLS_API')) {
@@ -30,24 +30,32 @@ function panels_requirements_install() {
       include_once drupal_get_path('module', 'ctools') . '/ctools.module';
     }
     if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
-       $requirements['panels_ctools'] = array(
-         'title' => $t('CTools API Version'),
-         'value' => CTOOLS_API_VERSION,
-         'severity' => REQUIREMENT_ERROR,
-         'description' => t('The CTools API version is too old for Panels. Panels needs at least %version.', array('%version' => PANELS_REQUIRED_CTOOLS_API))
-       );
+      $requirements['panels_ctools'] = array(
+        'title' => $t('CTools API Version'),
+        'value' => CTOOLS_API_VERSION,
+        'severity' => REQUIREMENT_ERROR,
+        'description' => t('The CTools API version is too old for Panels. Panels needs at least %version.', array('%version' => PANELS_REQUIRED_CTOOLS_API)),
+      );
     }
   }
   return $requirements;
 }
 
 /**
- * Implementation of hook_schema().
+ * Implements of hook_schema().
  */
 function panels_schema() {
-  // This should always point to our 'current' schema. This makes it relatively easy
-  // to keep a record of schema as we make changes to it.
-  return panels_schema_5();
+  // This should always point to our 'current' schema. This makes it relatively
+  // easy to keep a record of schema as we make changes to it.
+  return panels_schema_6();
+}
+
+function panels_schema_6() {
+  $schema = panels_schema_5();
+
+  $schema['cache_panels'] = drupal_get_schema_unprocessed('system', 'cache');
+
+  return $schema;
 }
 
 function panels_schema_5() {
@@ -351,8 +359,6 @@ function panels_schema_3() {
     'primary key' => array('lid'),
   );
 
-  $schema['cache_panels'] = drupal_get_schema_unprocessed('system', 'cache');
-
   return $schema;
 }
 
@@ -402,6 +408,9 @@ function panels_update_7301() {
  * Adding universally unique identifiers to panels.
  */
 function panels_update_7302() {
+  if (!module_load_include('inc', 'ctools', 'includes/uuid')) {
+    throw new DrupalUpdateException(t('Ctools UUID support not detected. You must update to a more recent version of the ctools module.'));
+  }
   // Load the schema.
   $schema = panels_schema_5();
   $msg = array();
@@ -453,6 +462,11 @@ function panels_update_7302() {
 
   $dids = array_unique(array_merge($display_dids, $pane_dids));
 
+  // If the Panels module is disabled we don't have access to
+  // panels_load_displays().
+  if (!function_exists('panels_load_displays')) {
+    module_load_include('module', 'panels');
+  }
   if ($displays = panels_load_displays($dids)) {
     foreach ($displays as $display) {
       // A display save also triggers pane saves.
@@ -471,9 +485,10 @@ function panels_update_7302() {
  * Add a custom cache table for Panels.
  */
 function panels_update_7303() {
+  $schema = panels_schema_6();
+
   $table_name = 'cache_panels';
   if (!db_table_exists($table_name)) {
-    $schema = drupal_get_schema_unprocessed('system', 'cache');
-    db_create_table($table_name, $schema);
+    db_create_table($table_name, $schema[$table_name]);
   }
 }
diff --git a/drupal7/sites/all/modules/panels/panels.module b/drupal7/sites/all/modules/panels/panels.module
index 1ca8b496..1136ddb0 100644
--- a/drupal7/sites/all/modules/panels/panels.module
+++ b/drupal7/sites/all/modules/panels/panels.module
@@ -6,7 +6,22 @@
  * Core functionality for the Panels engine.
  */
 
-define('PANELS_REQUIRED_CTOOLS_API', '2.0-alpha');
+define('PANELS_REQUIRED_CTOOLS_API', '2.0.8');
+
+/**
+ * The current working panels version.
+ *
+ * In a release, it should be 7.x-3.x, which should match what drush make will
+ * create. In a dev format, it should be 7.x-3.(x+1)-dev, which will allow
+ * modules depending on new features in panels to depend on panels > 7.x-3.x.
+ *
+ * To define a specific version of Panels as a dependency for another module,
+ * simply include a dependency line in that module's info file, e.g.:
+ *   ; Requires Panels v7.x-3.4 or newer.
+ *   dependencies[] = panels (>=3.4)
+ */
+define('PANELS_VERSION', '7.x-3.5');
+
 
 define('PANELS_TITLE_FIXED', 0); // Hide title use to be true/false. So false remains old behavior.
 define('PANELS_TITLE_NONE', 1); // And true meant no title.
@@ -43,7 +58,7 @@ function panels_theme() {
     'variables' => array('id' => NULL, 'image' => NULL, 'title' => NULL),
   );
   $theme['panels_pane'] = array(
-    'variables' => array('output' => array(), 'pane' => array(), 'display' => array()),
+    'variables' => array('content' => array(), 'pane' => array(), 'display' => array()),
     'path' => drupal_get_path('module', 'panels') . '/templates',
     'template' => 'panels-pane',
   );
@@ -269,7 +284,7 @@ function panels_permission() {
   return array(
     'use panels dashboard' => array(
       'title' => t("Use Panels Dashboard"),
-      'description' => t("Allows a user to access the !link.", array('!link' => l('Panels Dashboard', 'admin/structure/panels'))),
+      'description' => t('Allows a user to access the <a href="@url">Panels Dashboard</a>.', array('@url' => url('admin/structure/panels'))),
     ),
     'view pane admin links' => array( // @todo
       'title' => t("View administrative links on Panel panes"),
@@ -329,7 +344,9 @@ function panels_permission() {
  * Implements hook_flush_caches().
  */
 function panels_flush_caches() {
-  return array('cache_panels');
+  if (db_table_exists('cache_panels')) {
+    return array('cache_panels');
+  }
 }
 
 // ---------------------------------------------------------------------------
@@ -786,6 +803,7 @@ function panels_new_pane($type, $subtype, $set_defaults = FALSE) {
     $content_subtype = ctools_content_get_subtype($content_type, $subtype);
     $pane->configuration = ctools_content_get_defaults($content_type, $content_subtype);
   }
+  drupal_alter('panels_new_pane', $pane);
 
   return $pane;
 }
@@ -1316,6 +1334,7 @@ function template_preprocess_panels_pane(&$vars) {
   $vars['pane_suffix'] = !empty($content->pane_suffix) ? $content->pane_suffix : '';
 
   $vars['title'] = !empty($content->title) ? $content->title : '';
+  $vars['title_heading'] = !empty($content->title_heading) ? $content->title_heading : 'h2';
   $vars['title_attributes_array']['class'][] = 'pane-title';
 
   $vars['feeds'] = !empty($content->feeds) ? implode(' ', $content->feeds) : '';
@@ -1772,6 +1791,98 @@ function _panels_builder_filter($layout) {
   return empty($layout['builder']);
 }
 
+/**
+ * Implements hook_get_pane_links_alter().
+ *
+ * add links to the Panels pane dropdown menu.
+ */
+function panels_get_pane_links_alter(&$links, $pane, $content_type) {
+  if ($pane->type === "block"){
+    $prefixed_name = $pane->subtype;
+
+    // breakup the subtype string into parts.
+    $exploded_subtype = explode('-', $pane->subtype);
+
+    // get the first part of the string.
+    $subtype_prefix = $exploded_subtype[0];
+
+    // get the first part of the string and add a hyphen.
+    $subtype_prefix_hyphen = $exploded_subtype[0] . '-';
+
+    // remove the prefix block- to get the name.
+    $name_of_block = ltrim( $prefixed_name, $subtype_prefix_hyphen);
+
+    // check for user added menus created at /admin/structure/menu/add
+    // menus of that type have a subtype that is prefixed with menu-menu-
+    if (substr($prefixed_name, 0, 10) === "menu-menu-"){
+      // remove the first prefix menu- from menu-menu- to get the name.
+      $name_of_block = substr($prefixed_name, 5);
+
+      $links['top'][] = array(
+        'title' => t('Edit block'),
+        'href' => url('admin/structure/block/manage/' . $subtype_prefix . '/' . $name_of_block . '/configure', array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+
+      $links['top'][] = array(
+        'title' => t('Edit menu links'),
+        'href' => url('admin/structure/menu/manage/' . $name_of_block, array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+    }
+
+    // check for module provided menu blocks like Devels or Features
+    // menus of that type have a subtype that is prefixed with menu-
+    elseif(substr($prefixed_name, 0, 5) === "menu-"){
+      // remove the first prefix menu- to get the name.
+      $name_of_block = substr($prefixed_name, 5);
+
+      $links['top'][] = array(
+        'title' => t('Edit block'),
+        'href' => url('admin/structure/block/manage/' . $subtype_prefix . '/' . $name_of_block . '/configure', array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+
+      $links['top'][] = array(
+        'title' => t('Edit menu links'),
+        'href' => url('admin/structure/menu/manage/' . $name_of_block, array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+    }
+
+    // check for system blocks with menu links
+    elseif(substr($prefixed_name, 0, 7) === "system-") {
+      // remove the first prefix system- to get the name
+      $name_of_block = substr($prefixed_name, 7);
+
+      $names_of_system_menus = menu_list_system_menus();
+
+      $links['top'][] = array(
+        'title' => t('Edit block'),
+        'href' => url('admin/structure/block/manage/' . $subtype_prefix . '/' . $name_of_block . '/configure', array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+
+      if (array_key_exists($name_of_block, $names_of_system_menus)){
+        $links['top'][] = array(
+          'title' => t('Edit menu links'),
+          'href' => url('admin/structure/menu/manage/' . $name_of_block, array('absolute' => TRUE)),
+          'attributes' => array('target' => array('_blank')),
+        );
+      }
+    }
+
+    // for all other blocks without menus
+    else{
+      $links['top'][] = array(
+        'title' => t('Edit block'),
+        'href' => url('admin/structure/block/manage/' . $subtype_prefix . '/' . $name_of_block . '/configure', array('absolute' => TRUE)),
+        'attributes' => array('target' => array('_blank')),
+      );
+    }
+  }
+}
+
 // --------------------------------------------------------------------------
 // Deprecated functions
 //
@@ -1791,7 +1902,7 @@ function panels_get_path($file, $base_path = FALSE, $module = 'panels') {
 function panels_preprocess_html(&$vars) {
   $panel_body_css = &drupal_static('panel_body_css');
   if (!empty($panel_body_css['body_classes_to_remove'])) {
-    $classes_to_remove = explode(' ', $panel_body_css['body_classes_to_remove']);
+    $classes_to_remove = array_filter(explode(' ', $panel_body_css['body_classes_to_remove']), 'strlen');
     foreach ($vars['classes_array'] as $key => $css_class) {
       if (in_array($css_class, $classes_to_remove)) {
         unset($vars['classes_array'][$key]);
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe-rtl.css b/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe-rtl.css
index ef78afb6..abfc50e1 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe-rtl.css
+++ b/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe-rtl.css
@@ -49,8 +49,8 @@ div.panels-ipe-control .form-submit {
   padding: 0 34px 2px 0.8em;
 }
 
-input#panels-ipe-save,
-input#panels-ipe-cancel {
+#panels-ipe-save,
+#panels-ipe-cancel {
   background-position: 86% 0;
 }
 
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe.css b/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe.css
index ec372c60..e7896e26 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe.css
+++ b/drupal7/sites/all/modules/panels/panels_ipe/css/panels_ipe.css
@@ -241,7 +241,9 @@ div.panels-ipe-handlebar-wrapper li.delete a span {
 div.panels-ipe-handlebar-wrapper li a:hover,
 div.panels-ipe-dragtitle span:hover,
 div.panels-ipe-newblock a:hover,
-span.panels-ipe-draghandle-icon:hover {
+span.panels-ipe-draghandle-icon:hover,
+div.panels-ipe-handlebar-wrapper li a:focus,
+div.panels-ipe-newblock a:focus {
   background: #E6E6E6;
   background-image: linear-gradient(bottom, #C5C5C5 0%, #FAFAFA 100%);
   background-image: -o-linear-gradient(bottom, #C5C5C5 0%, #FAFAFA 100%);
@@ -382,6 +384,7 @@ div.panels-ipe-control .form-submit {
 
 div.panels-ipe-control input.panels-ipe-save, div.panels-ipe-control input.panels-ipe-cancel,
 div.panels-ipe-control input.panels-ipe-save:hover, div.panels-ipe-control input.panels-ipe-cancel:hover,
+div.panels-ipe-control input.panels-ipe-save:focus, div.panels-ipe-control input.panels-ipe-cancel:focus,
 div.panels-ipe-control input.panels-ipe-save:active, div.panels-ipe-control input.panels-ipe-cancel:active {
   background-repeat: no-repeat;
 }
@@ -394,7 +397,7 @@ div.panels-ipe-pseudobutton-container a {
   text-decoration: none;
 }
 
-div.panels-ipe-control input.panels-ipe-save {
+div.panels-ipe-control .panels-ipe-save {
   background-image: url(../images/icon-save.png);
   background-image: url(../images/icon-save.png), linear-gradient(bottom, #383838 0%, #666666 100%);
   background-image: url(../images/icon-save.png), -o-linear-gradient(bottom, #383838 0%, #666666 100%);
@@ -411,7 +414,7 @@ div.panels-ipe-control input.panels-ipe-save {
   );
 }
 
-div.panels-ipe-control input.panels-ipe-cancel {
+div.panels-ipe-control .panels-ipe-cancel {
   background-image: url(../images/icon-close.png);
   background-image: url(../images/icon-close.png), linear-gradient(bottom, #383838 0%, #666666 100%);
   background-image: url(../images/icon-close.png), -o-linear-gradient(bottom, #383838 0%, #666666 100%);
@@ -429,7 +432,9 @@ div.panels-ipe-control input.panels-ipe-cancel {
 }
 
 div.panels-ipe-pseudobutton-container:hover,
-div.panels-ipe-control .form-submit:hover {
+div.panels-ipe-control .form-submit:hover,
+div.panels-ipe-pseudobutton-container:focus,
+div.panels-ipe-control .form-submit:focus {
   background: #999999;
   background-image: linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
   background-image: -o-linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
@@ -447,11 +452,13 @@ div.panels-ipe-control .form-submit:hover {
   color: #FFF;
 }
 
-div.panels-ipe-pseudobutton-container a:hover {
+div.panels-ipe-pseudobutton-container a:hover,
+div.panels-ipe-pseudobutton-container a:focus {
   color: #FFF;
 }
 
-div.panels-ipe-control input.panels-ipe-cancel:hover {
+div.panels-ipe-control .panels-ipe-cancel:hover,
+div.panels-ipe-control .panels-ipe-cancel:focus {
   background-image: url(../images/icon-close.png), linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
   background-image: url(../images/icon-close.png), -o-linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
   background-image: url(../images/icon-close.png), -moz-linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
@@ -467,7 +474,8 @@ div.panels-ipe-control input.panels-ipe-cancel:hover {
   );
 }
 
-div.panels-ipe-control input.panels-ipe-save:hover {
+div.panels-ipe-control .panels-ipe-save:hover,
+div.panels-ipe-control .panels-ipe-save:focus {
   background-image: url(../images/icon-save.png), linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
   background-image: url(../images/icon-save.png), -o-linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
   background-image: url(../images/icon-save.png), -moz-linear-gradient(bottom, #3D3D3D 0%, #999999 100%);
@@ -507,7 +515,7 @@ div.panels-ipe-pseudobutton-container a:active {
   color: #CCC;
 }
 
-div.panels-ipe-control input.panels-ipe-cancel:active {
+div.panels-ipe-control .panels-ipe-cancel:active {
   background-image: url(../images/icon-close.png), linear-gradient(bottom, #616161 0%, #333333 100%);
   background-image: url(../images/icon-close.png), -o-linear-gradient(bottom, #616161 0%, #333333 100%);
   background-image: url(../images/icon-close.png), -moz-linear-gradient(bottom, #616161 0%, #333333 100%);
@@ -523,7 +531,7 @@ div.panels-ipe-control input.panels-ipe-cancel:active {
   );
 }
 
-div.panels-ipe-control input.panels-ipe-save:active {
+div.panels-ipe-control .panels-ipe-save:active {
   background-image: url(../images/icon-save.png), linear-gradient(bottom, #616161 0%, #333333 100%);
   background-image: url(../images/icon-save.png), -o-linear-gradient(bottom, #616161 0%, #333333 100%);
   background-image: url(../images/icon-save.png), -moz-linear-gradient(bottom, #616161 0%, #333333 100%);
@@ -539,6 +547,12 @@ div.panels-ipe-control input.panels-ipe-save:active {
   );
 }
 
+div.panels-ipe-control .panels-ipe-save, div.panels-ipe-control .panels-ipe-cancel,
+div.panels-ipe-control .panels-ipe-save:hover, div.panels-ipe-control .panels-ipe-cancel:hover,
+div.panels-ipe-control .panels-ipe-save:active, div.panels-ipe-control .panels-ipe-cancel:active {
+  background-repeat: no-repeat;
+}
+
 div.panels-ipe-pseudobutton-container a.panels-ipe-startedit {
   padding-left: 34px;
   background: url(../images/icon-configure.png) no-repeat 10px 9px;
@@ -557,3 +571,7 @@ div.panels-ipe-button-container {
 form#panels-ipe-edit-control-form {
   text-align: center;
 }
+
+.panels-ipe-dragbar-admin-title{
+  font-size: 0.9em;
+}
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/js/panels_ipe.js b/drupal7/sites/all/modules/panels/panels_ipe/js/panels_ipe.js
index aad076dc..b203f5e5 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/js/panels_ipe.js
+++ b/drupal7/sites/all/modules/panels/panels_ipe/js/panels_ipe.js
@@ -215,7 +215,7 @@ function DrupalPanelsIPE(cache_key, cfg) {
 
     $('.panels-ipe-form-container', ipe.control).append(formdata);
 
-    $('input:submit:not(.ajax-processed)', ipe.control).addClass('ajax-processed').each(function() {
+    $('input:submit:not(.ajax-processed), button:not(.ajax-processed)', ipe.control).addClass('ajax-processed').each(function() {
       var element_settings = {};
 
       element_settings.url = $(this.form).attr('action');
@@ -285,7 +285,7 @@ function DrupalPanelsIPE(cache_key, cfg) {
           val += id;
         }
       });
-      $('input[name="panel[pane][' +  region + ']"]', ipe.control).val(val);
+      $('[name="panel[pane][' +  region + ']"]', ipe.control).val(val);
     });
   }
 
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.info b/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.info
index 7fbb6e96..6ebaf5c9 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.info
+++ b/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.info
@@ -1,14 +1,15 @@
 name = Panels In-Place Editor
 description = Provide a UI for managing some Panels directly on the frontend, instead of having to use the backend.
 package = "Panels"
+version = PANELS_VERSION
 dependencies[] = panels
 core = 7.x
 configure = admin/structure/panels
 files[] = panels_ipe.module
 
-; Information added by Drupal.org packaging script on 2014-02-12
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-3.5"
 core = "7.x"
 project = "panels"
-datestamp = "1392221614"
+datestamp = "1422472985"
 
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.module b/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.module
index c3096843..a11fc3ae 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.module
+++ b/drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.module
@@ -133,18 +133,22 @@ function template_preprocess_panels_ipe_pane_wrapper(&$vars) {
 function theme_panels_ipe_pane_wrapper($vars) {
   $output = $vars['output'];
   $pane = $vars['pane'];
+  $display = $vars['display'];
 
   $attributes = array(
     'class' => 'panels-ipe-linkbar',
   );
 
+  $type = ctools_get_content_type($pane->type);
+  $title ='<span class = "panels-ipe-dragbar-admin-title">' . ctools_content_admin_title($type, $pane->subtype, $pane->configuration, $display->context) . '</span>';
+
   $links = theme('links', array('links' => $vars['links'], 'attributes' => $attributes));
 
   if (!empty($pane->locks['type']) && $pane->locks['type'] == 'immovable') {
-    $links = '<div class="panels-ipe-dragbar panels-ipe-nodraghandle clearfix">' . $links . '</div>';
+    $links = '<div class="panels-ipe-dragbar panels-ipe-nodraghandle clearfix">' . $links .$title .'</div>';
   }
   else {
-    $links = '<div class="panels-ipe-dragbar panels-ipe-draghandle clearfix">' . $links . '<span class="panels-ipe-draghandle-icon"><span class="panels-ipe-draghandle-icon-inner"></span></span></div>';
+    $links = '<div class="panels-ipe-dragbar panels-ipe-draghandle clearfix">' . $links . $title . '<span class="panels-ipe-draghandle-icon"><span class="panels-ipe-draghandle-icon-inner"></span></span></div>';
   }
 
   $handlebar = '<div class="panels-ipe-handlebar-wrapper panels-ipe-on">' . $links . '</div>';
diff --git a/drupal7/sites/all/modules/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php b/drupal7/sites/all/modules/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
index f1b32c54..c959a6de 100644
--- a/drupal7/sites/all/modules/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
+++ b/drupal7/sites/all/modules/panels/panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
@@ -29,6 +29,7 @@ class panels_renderer_ipe extends panels_renderer_editor {
       '#type' => 'link',
       '#title' => t('Customize this page'),
       '#href' => $this->get_url('save_form'),
+      '#options' => array('query' => drupal_get_destination()),
       '#id' => 'panels-ipe-customize-page',
       '#attributes' => array(
         'class' => array('panels-ipe-startedit', 'panels-ipe-pseudobutton'),
@@ -49,6 +50,7 @@ class panels_renderer_ipe extends panels_renderer_editor {
         '#type' => 'link',
         '#title' => t('Change layout'),
         '#href' => $this->get_url('change_layout'),
+        '#options' => array('query' => drupal_get_destination()),
         '#attributes' => array(
           'class' => array('panels-ipe-change-layout', 'panels-ipe-pseudobutton', 'ctools-modal-layout'),
         ),
diff --git a/drupal7/sites/all/modules/panels/panels_mini/panels_mini.css b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.css
new file mode 100644
index 00000000..246921c5
--- /dev/null
+++ b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.css
@@ -0,0 +1,12 @@
+/**
+ * @file
+ * Custom CSS for the Mini Panels module.
+ */
+
+/**
+ * Customize the CTools wizard trail / breadcrumb used on the edit pages for
+ * Mini Panels as a stop-gap measure until the UX can be completely re-done.
+ */
+.wizard-trail {
+  text-align: right;
+}
diff --git a/drupal7/sites/all/modules/panels/panels_mini/panels_mini.info b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.info
index 628dcf07..46a6b406 100644
--- a/drupal7/sites/all/modules/panels/panels_mini/panels_mini.info
+++ b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.info
@@ -1,12 +1,13 @@
 name = Mini panels
 description = Create mini panels that can be used as blocks by Drupal and panes by other panel modules.
 package = "Panels"
+version = PANELS_VERSION
 dependencies[] = panels
 core = 7.x
 files[] = plugins/export_ui/panels_mini_ui.class.php
-; Information added by Drupal.org packaging script on 2014-02-12
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-3.5"
 core = "7.x"
 project = "panels"
-datestamp = "1392221614"
+datestamp = "1422472985"
 
diff --git a/drupal7/sites/all/modules/panels/panels_mini/panels_mini.module b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.module
index 534916d8..f701893a 100644
--- a/drupal7/sites/all/modules/panels/panels_mini/panels_mini.module
+++ b/drupal7/sites/all/modules/panels/panels_mini/panels_mini.module
@@ -112,6 +112,7 @@ function panels_mini_block_view($delta = 0) {
       $contexts = ctools_context_match_required_contexts($panel_mini->requiredcontexts, $current_page['contexts']);
     }
   }
+  drupal_alter('panels_mini_block_contexts', $contexts, $panel_mini);
 
   $panel_mini->context = $panel_mini->display->context =  ctools_context_load_contexts($panel_mini, FALSE, $contexts);
   $panel_mini->display->css_id = panels_mini_get_id($panel_mini->name);
@@ -196,8 +197,8 @@ function panels_mini_get_pane_links_alter(&$links, $pane, $content_type) {
  */
 function panels_mini_contextual_links_view_alter(&$element, $items) {
 
-  // Add contextual links to all mini panel blocks.
-  if (isset($element['#element']['#block']) && strpos((string) $element['#element']['#block']->bid, 'panels_mini') === 0) {
+  // Add contextual links to all mini panel blocks with bid property.
+  if (isset($element['#element']['#block']) && isset($element['#element']['#block']->bid) && strpos((string) $element['#element']['#block']->bid, 'panels_mini') === 0) {
 
     $admin_pages = array(
       t('Configure mini panel settings') => 'basic',
@@ -518,3 +519,14 @@ function panels_mini_panels_dashboard_blocks(&$vars) {
   );
 
 }
+
+/**
+ * Implements template_preprocess_ctools_wizard_trail().
+ *
+ * Customize the divider used in the CTools wizard to build the edit pages for
+ * Mini Panels as a stop-gap measure until the UX can be completely re-done.
+ */
+function panels_mini_preprocess_ctools_wizard_trail(&$variables) {
+  $variables['divider'] = ' | ';
+  drupal_add_css(drupal_get_path('module', 'panels_mini') . '/panels_mini.css');
+}
diff --git a/drupal7/sites/all/modules/panels/panels_node/panels_node.info b/drupal7/sites/all/modules/panels/panels_node/panels_node.info
index 78591e59..407c9f4f 100644
--- a/drupal7/sites/all/modules/panels/panels_node/panels_node.info
+++ b/drupal7/sites/all/modules/panels/panels_node/panels_node.info
@@ -1,14 +1,15 @@
 name = Panel nodes
 description = Create nodes that are divided into areas with selectable content.
 package = "Panels"
+version = PANELS_VERSION
 dependencies[] = panels
 configure = admin/structure/panels
 core = 7.x
 files[] = panels_node.module
 
-; Information added by Drupal.org packaging script on 2014-02-12
-version = "7.x-3.4"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-3.5"
 core = "7.x"
 project = "panels"
-datestamp = "1392221614"
+datestamp = "1422472985"
 
diff --git a/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php b/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php
index 4876ff38..a814eb7f 100644
--- a/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php
+++ b/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_editor.class.php
@@ -161,7 +161,7 @@ class panels_renderer_editor extends panels_renderer_standard {
     if ($buttons) {
       $output .= '<span class="buttons">' . $buttons . '</span>';
     }
-    $output .= '<span class="text">' . $title . '</span>';
+    $output .= '<span class="text" title="' . check_plain($title) . '">' . $title . '</span>';
     $output .= '</div>'; // grabber
 
     $output .= '<div class="panel-pane-collapsible">';
@@ -467,21 +467,24 @@ class panels_renderer_editor extends panels_renderer_standard {
     drupal_alter('get_pane_links', $links, $pane, $content_type);
 
     $dropdown_links = $links['top'];
-    foreach (array(
-  'style' => 'Style',
-  'visibility' => 'Visibility rules',
-  'lock' => 'Locking',
-  'cache' => 'Caching'
-    ) as $category => $label) {
-      $dropdown_links[] = array(
-        'title' => '<hr />',
-        'html' => TRUE,
-      );
-      $dropdown_links[] = array(
-        'title' => '<span class="dropdown-header">' . t($label) . '</span>' . theme_links(array('links' => $links[$category], 'attributes' => array(), 'heading' => array())),
-        'html' => TRUE,
-        'attributes' => array('class' => array('panels-sub-menu')),
-      );
+    $category_labels = array(
+      'style' => 'Style',
+      'visibility' => 'Visibility rules',
+      'lock' => 'Locking',
+      'cache' => 'Caching',
+    );
+    foreach ($category_labels as $category => $label) {
+      if (array_key_exists($category, $links)) {
+        $dropdown_links[] = array(
+          'title' => '<hr />',
+          'html' => TRUE,
+        );
+        $dropdown_links[] = array(
+          'title' => '<span class="dropdown-header">' . t($label) . '</span>' . theme_links(array('links' => $links[$category], 'attributes' => array(), 'heading' => array())),
+          'html' => TRUE,
+          'attributes' => array('class' => array('panels-sub-menu')),
+        );
+      }
     }
 
     $dropdown_links[] = array(
@@ -944,8 +947,11 @@ class panels_renderer_editor extends panels_renderer_standard {
         ctools_include('content');
         $pane = &$this->display->content[$pid];
         $style = isset($pane->style['style']) ? $pane->style['style'] : 'default';
-        $subtype = ctools_content_get_subtype($pane->type, $pane->subtype);
-        $title = t('Pane style for "!pane"', array('!pane' => $subtype['title']));
+        $title = ctools_content_admin_title($pane->type, $pane->subtype, $pane->configuration, $this->display->context);
+        if (!$title) {
+          $title = $pane->type;
+        }
+        $title = t('Pane style for "!title"', array('!title' => $title));
         break;
 
       default:
@@ -1160,9 +1166,21 @@ class panels_renderer_editor extends panels_renderer_standard {
       unset($this->cache->style);
     }
 
+    if (!empty($form_state['cancel'])) {
+      // The cache must be saved prior to dismissing the modal.
+      panels_edit_cache_set($this->cache);
+      $this->commands[] = ctools_modal_command_dismiss();
+      return;
+    }
+
     // Copy settings from form state back into the cache.
     if(!empty($form_state['values']['settings'])) {
-      $this->cache->display->content[$pid]->style['settings'] = $form_state['values']['settings'];
+      if ($type == 'pane') {
+        $this->cache->display->content[$pid]->style['settings'] = $form_state['values']['settings'];
+      }
+      else if($type == 'region') {
+        $this->cache->display->panel_settings['style_settings'][$pid] = $form_state['values']['settings'];
+      }
     }
 
     panels_edit_cache_set($this->cache);
@@ -1697,9 +1715,28 @@ function panels_edit_style_settings_form($form, &$form_state) {
     '#value' => t('Save'),
   );
 
+
+  // Need a cancel button since the style cache can persist and impact the wrong
+  // pane (or region, or display).
+  $form['cancel_style'] = array(
+    '#type' => 'submit',
+    '#value' => t('Cancel'),
+    '#submit' => array('panels_edit_style_settings_form_cancel'),
+  );
+
   return $form;
 }
 
+/**
+ * Cancel style settings form.
+ *
+ * Clears the editing cache to prevent styles being applied to incorrect regions
+ * or panes.
+ */
+function panels_edit_style_settings_form_cancel($form, &$form_state) {
+  $form_state['cancel'] = TRUE;
+}
+
 /**
  * Validate style settings.
  */
diff --git a/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php b/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php
index db71b6bd..1de5bf41 100644
--- a/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php
+++ b/drupal7/sites/all/modules/panels/plugins/display_renderers/panels_renderer_standard.class.php
@@ -407,14 +407,23 @@ class panels_renderer_standard {
    * their CSS added in the right order: inner content before outer content.
    */
   function add_meta() {
+    global $theme;
+
     if (!empty($this->plugins['layout']['css'])) {
+      // Do not use the path_to_theme() function, because it returns the
+      // $GLOBALS['theme_path'] value, which may be overriden in the theme()
+      // function when the theme hook defines the key 'theme path'.
+      $theme_path = isset($theme) ? drupal_get_path('theme', $theme) : '';
+
       $css = $this->plugins['layout']['css'];
       if (!is_array($css)) {
         $css = array($css);
       }
-      foreach($css as $file) {
-        if (file_exists(path_to_theme() . '/' . $file)) {
-          $this->add_css(path_to_theme() . '/' . $file);
+
+      // Load each of the CSS files defined in this layout.
+      foreach ($css as $file) {
+        if (!empty($theme_path) && file_exists($theme_path . '/' . $file)) {
+          $this->add_css($theme_path . '/' . $file);
         }
         else {
           $this->add_css($this->plugins['layout']['path'] . '/' . $file);
@@ -427,7 +436,7 @@ class panels_renderer_standard {
       if (!is_array($admin_css)) {
         $admin_css = array($admin_css);
       }
-      foreach($admin_css as $file) {
+      foreach ($admin_css as $file) {
         $this->add_css($this->plugins['layout']['path'] . '/' . $file);
       }
     }
diff --git a/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible-admin.js b/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible-admin.js
index 910b3c8e..2cddd42d 100644
--- a/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible-admin.js
+++ b/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible-admin.js
@@ -17,7 +17,7 @@ Drupal.flexible.fixHeight = function() {
 Drupal.behaviors.flexibleAdmin = {
   attach: function(context) {
     // Show/hide layout manager button
-    $('input#panels-flexible-toggle-layout:not(.panels-flexible-processed)', context)
+    $('#panels-flexible-toggle-layout:not(.panels-flexible-processed)', context)
       .addClass('panels-flexible-processed')
       .click(function() {
         $('.panel-flexible-admin')
diff --git a/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible.inc b/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible.inc
index f49886bf..4cdb216b 100644
--- a/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible.inc
+++ b/drupal7/sites/all/modules/panels/plugins/layouts/flexible/flexible.inc
@@ -471,15 +471,26 @@ function panels_flexible_render_items($renderer, $list, $owner_id) {
     switch ($item['type']) {
       case 'column':
         $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['column'] . '-' . $id);
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
+        if (empty($renderer->settings['items'][$id]['hide_empty']) || trim($content)) {
+          $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
+        }
         break;
       case 'row':
         $content = panels_flexible_render_items($renderer, $item['children'], $renderer->base['row'] . '-' . $id);
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, TRUE);
+        if (empty($renderer->settings['items'][$id]['hide_empty']) || trim($content)) {
+          $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max, TRUE);
+        }
         break;
       case 'region':
-        $content = isset($renderer->content[$id]) ? $renderer->content[$id] : "&nbsp;";
-        $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
+        if (empty($renderer->settings['items'][$id]['hide_empty'])) {
+          $content = isset($renderer->content[$id]) ? $renderer->content[$id] : "&nbsp;";
+        }
+        else {
+          $content = isset($renderer->content[$id]) ? trim($renderer->content[$id]) : "";
+        }
+        if (empty($renderer->settings['items'][$id]['hide_empty']) || $content) {
+          $groups[$location] .= panels_flexible_render_item($renderer, $item, $content, $id, $position, $max);
+        }
         break;
     }
 
@@ -1186,6 +1197,12 @@ function panels_flexible_config_item_form($form, &$form_state) {
     }
   }
 
+  $form['hide_empty'] = array(
+    '#title' => t('Hide element if empty'),
+    '#type' => 'checkbox',
+    '#default_value' => !empty($item['hide_empty']) ? 1 : 0,
+  );
+
   $form['save'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
@@ -1223,6 +1240,7 @@ function panels_flexible_config_item_form_submit(&$form, &$form_state) {
   else {
     $item['contains'] = $form_state['values']['contains'];
   }
+  $item['hide_empty'] = $form_state['values']['hide_empty'];
 
 }
 
@@ -1486,6 +1504,12 @@ function panels_flexible_add_item_form($form, &$form_state) {
     );
   }
 
+  $form['hide_empty'] = array(
+    '#title' => t('Hide element if empty'),
+    '#type' => 'checkbox',
+    '#default_value' => 0,
+  );
+
   $form['save'] = array(
     '#type' => 'submit',
     '#value' => t('Save'),
@@ -1516,6 +1540,8 @@ function panels_flexible_add_item_form_submit(&$form, &$form_state) {
     $item['contains'] = $form_state['values']['contains'];
   }
 
+  $item['hide_empty'] = $form_state['values']['hide_empty'];
+
   if ($item['type'] == 'region') {
     // derive the region key from the title
     $key = preg_replace("/[^a-z0-9]/", '_', drupal_strtolower($item['title']));
diff --git a/drupal7/sites/all/modules/panels/plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.css b/drupal7/sites/all/modules/panels/plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.css
index 1aa00dad..c24dabf9 100644
--- a/drupal7/sites/all/modules/panels/plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.css
+++ b/drupal7/sites/all/modules/panels/plugins/layouts/threecol_25_50_25_stacked/threecol_25_50_25_stacked.css
@@ -18,7 +18,7 @@
   width: 25%; 
 }
 
-.panel-3col-stacked .panel-col .inside { 
+.panel-3col-stacked .panel-col-first .inside { 
   margin: 0 .5em 1em .5em;
 }
 
diff --git a/drupal7/sites/all/modules/panels/plugins/task_handlers/panel_context.inc b/drupal7/sites/all/modules/panels/plugins/task_handlers/panel_context.inc
index c3bb07fb..9f03b554 100644
--- a/drupal7/sites/all/modules/panels/plugins/task_handlers/panel_context.inc
+++ b/drupal7/sites/all/modules/panels/plugins/task_handlers/panel_context.inc
@@ -317,11 +317,21 @@ function panels_panel_context_render($handler, $base_contexts, $args, $test = TR
   // Remove and add body element classes
   $panel_body_css = &drupal_static('panel_body_css');
 
-  if (isset($handler->conf['body_classes_to_remove']) && !isset($panel_body_css['body_classes_to_remove'])) {
-    $panel_body_css['body_classes_to_remove'] = $handler->conf['body_classes_to_remove'];
+  if (isset($handler->conf['body_classes_to_remove'])) {
+    if (!isset($panel_body_css['body_classes_to_remove'])) {
+      $panel_body_css['body_classes_to_remove'] = $handler->conf['body_classes_to_remove'];
+    }
+    else{
+      $panel_body_css['body_classes_to_remove'] .= ' ' . $handler->conf['body_classes_to_remove'];
+    }
   }
-  if (isset($handler->conf['body_classes_to_add']) && !isset($panel_body_css['body_classes_to_add'])) {
-    $panel_body_css['body_classes_to_add'] = $handler->conf['body_classes_to_add'];
+  if (isset($handler->conf['body_classes_to_add'])) {
+    if (!isset($panel_body_css['body_classes_to_add'])) {
+      $panel_body_css['body_classes_to_add'] = $handler->conf['body_classes_to_add'];
+    }
+    else {
+      $panel_body_css['body_classes_to_add'] .= ' '. $handler->conf['body_classes_to_add'];
+    }
   }
 
   $info = array(
@@ -763,7 +773,7 @@ function panels_panel_context_edit_settings($form, &$form_state) {
   $form['conf']['body_classes_to_remove'] = array(
     '#type' => 'textfield',
     '#size' => 128,
-    '#default_value' => $conf['body_classes_to_remove'],
+    '#default_value' => empty($conf['body_classes_to_remove']) ? '' : $conf['body_classes_to_remove'],
     '#title' => t('Remove body CSS classes'),
     '#description' => t('The CSS classes to remove from the body element of this page. Separated by a space. For example: no-sidebars one-sidebar sidebar-first sidebar-second two-sidebars.'),
   );
@@ -771,7 +781,7 @@ function panels_panel_context_edit_settings($form, &$form_state) {
   $form['conf']['body_classes_to_add'] = array(
     '#type' => 'textfield',
     '#size' => 128,
-    '#default_value' => $conf['body_classes_to_add'],
+    '#default_value' => empty($conf['body_classes_to_add']) ? '' : $conf['body_classes_to_add'],
     '#title' => t('Add body CSS classes'),
     '#description' => t('The CSS classes to add to the body element of this page. Separated by a space. For example: no-sidebars one-sidebar sidebar-first sidebar-second two-sidebars.'),
   );
diff --git a/drupal7/sites/all/modules/panels/templates/panels-add-content-link.tpl.php b/drupal7/sites/all/modules/panels/templates/panels-add-content-link.tpl.php
index b4266051..149ac829 100644
--- a/drupal7/sites/all/modules/panels/templates/panels-add-content-link.tpl.php
+++ b/drupal7/sites/all/modules/panels/templates/panels-add-content-link.tpl.php
@@ -5,6 +5,10 @@
  */
 ?>
 <div class="content-type-button clearfix">
-  <?php print $image_button; ?>
-  <div><?php print $text_button; ?></div>
+  <?php if (isset($icon_text_button)): ?>
+    <?php print $icon_text_button; ?>
+  <?php else: ?>
+    <?php print $image_button; ?>
+    <div><?php print $text_button; ?></div>
+  <?php endif; ?>
 </div>
diff --git a/drupal7/sites/all/modules/panels/templates/panels-pane.tpl.php b/drupal7/sites/all/modules/panels/templates/panels-pane.tpl.php
index b3ae51b4..0aa01021 100644
--- a/drupal7/sites/all/modules/panels/templates/panels-pane.tpl.php
+++ b/drupal7/sites/all/modules/panels/templates/panels-pane.tpl.php
@@ -27,7 +27,9 @@
 
   <?php print render($title_prefix); ?>
   <?php if ($title): ?>
-    <h2<?php print $title_attributes; ?>><?php print $title; ?></h2>
+    <<?php print $title_heading; ?><?php print $title_attributes; ?>>
+      <?php print $title; ?>
+    </<?php print $title_heading; ?>>
   <?php endif; ?>
   <?php print render($title_suffix); ?>
 
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.admin.inc b/drupal7/sites/all/modules/webform_validation/webform_validation.admin.inc
index e1b0b542..e9146193 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.admin.inc
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.admin.inc
@@ -256,6 +256,12 @@ function webform_validation_manage_rule($form, $form_state, $node, $action = 'ad
     '#weight' => 25,
   );
 
+  $destination = drupal_get_destination();
+  $form['rule']['cancel'] = array(
+    '#markup' => l(t('Cancel'), $destination['destination']),
+    '#weight' => 26,
+  );
+
   return $form;
 }
 
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.info b/drupal7/sites/all/modules/webform_validation/webform_validation.info
index d3afd9f6..d4bc3686 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.info
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.info
@@ -11,9 +11,9 @@ files[] = webform_validation.module
 files[] = webform_validation.rules.inc
 files[] = webform_validation.validators.inc
 
-; Information added by Drupal.org packaging script on 2014-09-09
-version = "7.x-1.7"
+; Information added by Drupal.org packaging script on 2015-01-23
+version = "7.x-1.8"
 core = "7.x"
 project = "webform_validation"
-datestamp = "1410296269"
+datestamp = "1422027782"
 
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.module b/drupal7/sites/all/modules/webform_validation/webform_validation.module
index e86ba311..5cd5ab45 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.module
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.module
@@ -5,8 +5,8 @@
  * Add validation rules to webforms
  */
 
-include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'webform_validation') . '/' . 'webform_validation.validators.inc';
-include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'webform_validation') . '/' . 'webform_validation.rules.inc';
+include_once('webform_validation.validators.inc');
+include_once('webform_validation.rules.inc');
 
 /**
  * Implements hook_menu().
@@ -153,6 +153,13 @@ function webform_validation_validate($form, &$form_state) {
   }
 
   if ($rules) {
+    $component_definitions = webform_validation_prefix_keys($node->webform['components']);
+    // Remove hidden components.
+    foreach ($component_definitions as $key => $component) {
+      if (_webform_client_form_rule_check($node, $component, 0, $form_state['values']['submitted']) !== WEBFORM_CONDITIONAL_INCLUDE) {
+        unset($flat_values[$key]);
+      }
+    }
     foreach ($rules as $rule) {
       // create a list of components that need validation against this rule (component id => user submitted value)
       $items = array();
@@ -163,7 +170,6 @@ function webform_validation_validate($form, &$form_state) {
       }
       // prefix array keys to avoid reindexing by the module_invoke_all function call
       $items = webform_validation_prefix_keys($items);
-      $component_definitions = webform_validation_prefix_keys($node->webform['components']);
       $rule['sid'] = $sid;
       // have the submitted values validated
       $errors = module_invoke_all("webform_validation_validate", $rule['validator'], $items, $component_definitions, $rule);
@@ -302,7 +308,7 @@ function theme_webform_validation_manage_add_rule($variables) {
  */
 function webform_validation_webform_validation($type, $op, $data) {
   if ($type == 'rule' && in_array($op, array('add', 'edit'))) {
-    if (module_exists('i18n') && isset($data['error_message'])) {
+    if (module_exists('i18n_string') && isset($data['error_message'])) {
       i18n_string_update('webform_validation:error_message:' . $data['ruleid'] . ':message', $data['error_message']);
     }
   }
diff --git a/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc b/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
index ce4e28e2..363ba8ce 100644
--- a/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
+++ b/drupal7/sites/all/modules/webform_validation/webform_validation.validators.inc
@@ -146,7 +146,7 @@ function webform_validation_webform_validation_validators() {
       ),
       'min_components' => 2,
       'max_components' => 2,
-      'description' => t('Compare two values for greater than or less than, or equal to.'),
+      'description' => t('Compare two values for greater than (>), less than (<), greater than or equal to (>=), or less than or equal to (<=).'),
     ),
     'unique' => array(
       'name' => t('Unique values'),
@@ -446,6 +446,8 @@ function webform_validation_webform_validation_validate($validator_name, $items,
     }
     $items[$key] = $new_values;
   }
+  // Ensure later calls to key() get the first item.
+  reset($items);
 
   $errors = array();
   switch ($validator_name) {
diff --git a/drupal7/sites/all/themes/adminimal_theme/adminimal.info b/drupal7/sites/all/themes/adminimal_theme/adminimal.info
index aab9e58e..95cf268c 100644
--- a/drupal7/sites/all/themes/adminimal_theme/adminimal.info
+++ b/drupal7/sites/all/themes/adminimal_theme/adminimal.info
@@ -20,9 +20,9 @@ regions[page_bottom] = Page bottom
 regions[sidebar_first] = First sidebar
 regions_hidden[] = sidebar_first
 
-; Information added by Drupal.org packaging script on 2015-01-17
-version = "7.x-1.19"
+; Information added by Drupal.org packaging script on 2015-01-28
+version = "7.x-1.20"
 core = "7.x"
 project = "adminimal_theme"
-datestamp = "1421496186"
+datestamp = "1422442296"
 
diff --git a/drupal7/sites/all/themes/adminimal_theme/css/mobile.css b/drupal7/sites/all/themes/adminimal_theme/css/mobile.css
index 4769601f..a008d623 100644
--- a/drupal7/sites/all/themes/adminimal_theme/css/mobile.css
+++ b/drupal7/sites/all/themes/adminimal_theme/css/mobile.css
@@ -30,14 +30,19 @@ ul.primary {
   float: none;
   clear: both;
   display: block;
-  padding: 0 50px 0 10px;
+  padding: 0 10px 0 10px;
+  background: #333;
+  width: 100%;
+  border-bottom: 5px solid #0074BD;
+  box-sizing: border-box;
 }
 
 ul.primary li {
   clear: both;
-  display: block;
+  display: table;
   float: none;
   margin: 0;
+  width: 100%;
 }
 
 body.adminimal-theme ul.primary li a:active, body.adminimal-theme ul.primary li a:link, body.adminimal-theme ul.primary li a:visited {
@@ -249,3 +254,7 @@ html.js .adminimal-theme #module-filter-show-wrapper .form-item {
 #sidebar-right .region-sidebar-right {
   padding-left: 0px;
 }
+
+.adminimal-theme #module-filter-tabs.top-fixed{
+  position: relative;
+}
diff --git a/drupal7/sites/all/themes/adminimal_theme/css/style.css b/drupal7/sites/all/themes/adminimal_theme/css/style.css
index b203ea5a..4051e4ad 100644
--- a/drupal7/sites/all/themes/adminimal_theme/css/style.css
+++ b/drupal7/sites/all/themes/adminimal_theme/css/style.css
@@ -23,9 +23,9 @@ body.adminimal-theme *::-moz-focus-inner {
 }
 
 body.adminimal-theme * {
-  -moz-box-sizing: content-box;
-  -webkit-box-sizing: content-box;
-  box-sizing: content-box;
+  -moz-box-sizing: inherit;
+  -webkit-box-sizing: inherit;
+  box-sizing: inherit;
 }
 
 body {
@@ -321,47 +321,70 @@ ul.primary {
   clear: both;
   font-size: 0.923em;
   height: auto;
-  margin: 2px 0 0;
+  margin: 0;
   padding-top: 0;
+  padding-left: 8px;
+  padding-right: 8px;
+  width: 100%;
+  background: #ebebeb;
+  display: table;
 }
 
 ul.primary li {
   float: left;/* LTR */
   list-style: none;
-  margin: 0 2px;
+  margin: 0;
+}
+
+#navigation ul.primary li:first-of-type {
+  margin-left: 10px;
+}
+
+#navigation ul.primary li:first-of-type.active {
+  margin-left: 20px;
 }
 
 ul.primary li a:link,ul.primary li a.active,ul.primary li a:active,ul.primary li a:visited,ul.primary li a:hover,ul.primary li.active a {
   display: block;
   float: left;/* LTR */
   line-height: 18px;
-  background-color: #a6a7a2;
-  color: #000;
   font-weight: normal;
-  border-width: 1px 1px 0 1px;
-  border-style: solid;
-  border-color: #a6a7a2;
-  font-family: "Open Sans", "Segoe UI", "Helvetica", sans-serif;
-  font-size: 16px;
-  font-weight: 300;
+  border: 0;
+  font-size: 15px;
+  font-weight: normal;
   margin: 0;
-  padding: 10px 20px;
-  text-transform: none;
+  padding: 10px 12px;
+  color: #797979;
+  background: transparent;
 }
 
 ul.primary li.active a,ul.primary li.active a.active,ul.primary li.active a:active,ul.primary li.active a:visited {
   background-color: #fff;
   border: none;
-  border-top: 5px solid #0074BD;
-  margin-top: -4px;
+  border-top: 3px solid #0074BD;
+  margin-top: -3px;
+  color: #333;
+  box-shadow: 0px 0px 8px rgba(0,0,0,0.2);
+  position: relative;
+}
+
+ul.primary li.active a.active:after {
+  content: "";
+  display: block;
+  height: 5px;
+  left: 0px;
+  bottom: -5px;
+  width: 100%;
+  background: white;
+  position: absolute;
 }
 
 ul.primary li a:hover {
-  color: #fff;
+  color: #0074BD;
 }
 
 ul.primary li.active a:hover {
-  color: #000;
+  color: #333;
 }
 
 .tabs-secondary {
@@ -369,43 +392,54 @@ ul.primary li.active a:hover {
 }
 
 ul.secondary {
-  font-size: 0.923em;
-  padding: 0 3px 5px;
+  font-size: 1em;
+  padding: 0;
   line-height: 1.385em;
   overflow: hidden;
   background-color: #fff;
-  text-align: right;
   width: 100%;
 }
 
 ul.secondary li {
-  margin: 5px;
   float: left;/* LTR */
 }
 
 ul.secondary li a {
-  background-color: #ddd;
-  color: #000;
   display: inline-block;
+  color: #777;
+  border-bottom: 1px solid #EBEBEB;
 }
 
 ul.secondary li a,ul.secondary li a:hover,ul.secondary li.active a,ul.secondary li.active a.active {
   padding: 2px 10px;
-  -moz-border-radius: 7px;
-  -webkit-border-radius: 7px;
-  border-radius: 7px;
+  -moz-border-radius: 0;
+  -webkit-border-radius: 0;
+  border-radius: 0;
 }
 
 ul.secondary li a:hover,ul.secondary li.active a,ul.secondary li.active a.active {
-  color: #fff;
-  background: none repeat scroll 0% 0% #0074BD;
-  box-shadow: 0px -1px 0px #0074BD,0px 1px 0px #0074BD;
+  color: #0074BD;
+  background: transparent;
+  box-shadow: none;
+  border-color: #0074BD;
 }
 
 ul.secondary li a:hover {
 	box-shadow: none;
 }
 
+body.adminimal-theme ul.secondary li a, body.adminimal-theme ul.secondary li a:hover, body.adminimal-theme ul.secondary li.active a, body.adminimal-theme ul.secondary li.active a.active {
+  border-radius: 0;
+  padding: 10px 10px;
+}
+
+body.adminimal-theme ul.secondary li.active a, ul.secondary li.active a.active {
+  color: #000;
+  background-color: transparent;
+  box-shadow: none;
+  border-bottom: 1px solid #000;
+}
+
 div.vertical-tabs ul li.vertical-tab-button a {
   border-right: 1px solid #CCCCCC;
   background: #F9F9F9;
@@ -441,9 +475,7 @@ div.vertical-tabs ul li.selected a:focus strong {
  * Page layout.
  */
 #page {
-  padding: 20px 0 40px 0;/* LTR */
-  margin-right: 40px;/* LTR */
-  margin-left: 40px;/* LTR */
+  padding: 20px 40px;
   background: #fff;
   position: relative;
   color: #333;
@@ -1001,7 +1033,8 @@ div.admin-panel h3 {
 }
 
 .theme-selector h3 {
-  font-weight: normal;
+  font-weight: bold;
+  margin-bottom: 8px;
 }
 
 .theme-default h3 {
@@ -1508,12 +1541,6 @@ body div.status a {
   margin-top: 40px;
 }
 
-body.adminimal-theme ul.secondary li a, body.adminimal-theme ul.secondary li a:hover, body.adminimal-theme ul.secondary li.active a, body.adminimal-theme ul.secondary li.active a.active {
-  border-radius: 0;
-  padding: 2px 10px;
-  border: none;
-}
-
 body.adminimal-theme .views-ui-display-tab-bucket h3 {
   font-size: 20px;
   margin: 10px;
@@ -2112,14 +2139,6 @@ body.page-admin-dashboard .container-inline .form-actions, body.page-admin-dashb
   margin-top: 0;
 }
 
-/* Margin fix for some pages in overlay mode */
-body.page-admin-help.overlay #page,
-body.page-admin-reports-updates-update #page,
-body.page-admin-appearance.overlay #page {
-  margin: 0;
-  padding: 0 20px 20px;
-}
-
 .system-themes-list-disabled .theme-selector {
   display: inline-block;
   float: none;
@@ -2159,6 +2178,10 @@ body.page-admin-appearance.overlay #page {
   padding-top: 20px;
 }
 
+.system-themes-list-disabled .theme-selector .screenshot, .system-themes-list-disabled .theme-selector .no-screenshot {
+  margin-bottom: 10px;
+}
+
 #block-system-main {
   clear: both;
 }
@@ -2622,14 +2645,26 @@ body.adminimal-theme .views-displays .secondary a > .icon.add {
 }
 
 body.adminimal-theme #views-display-top #views-display-menu-tabs li.add .action-list {
-  top: 43px;
+  top: 42px;
   text-align: left;
+  width: auto;
+  background: #fff;
+  border: 1px solid #ccc;
+  box-shadow: 0 3px 5px rgba(0,0,0,0.1);
 }
 
-body.adminimal-theme ul.secondary li.active a, ul.secondary li.active a.active {
-	color: #FFF;
-	background-color: #888;
-	box-shadow: 0px -1px 0px #888, 0px 1px 0px #888;
+body.adminimal-theme .views-displays .secondary .action-list li {
+  border: none;
+  clear: both;
+}
+
+body.adminimal-theme .views-displays .secondary .action-list li.last  {
+  padding-bottom: 5px;
+}
+
+body.adminimal-theme .views-display-top ul#views-display-menu-tabs li a.active {
+  box-shadow: 0px 1px 0px #0073BC;
+  color: #0073BC;
 }
 
 body.adminimal-theme .views-display-top ul#views-display-menu-tabs li a:hover, 
diff --git a/drupal7/sites/all/themes/adminimal_theme/js/adminimal_theme.js b/drupal7/sites/all/themes/adminimal_theme/js/adminimal_theme.js
index b93d3674..264230d8 100644
--- a/drupal7/sites/all/themes/adminimal_theme/js/adminimal_theme.js
+++ b/drupal7/sites/all/themes/adminimal_theme/js/adminimal_theme.js
@@ -77,11 +77,11 @@ Drupal.behaviors.adminimal_move_active_primary_tab = {
 			breakpoint: 'mobile',
 				enter: function() {
 					$( "ul.tabs.primary li.active" ).clone().appendTo( "ul.tabs.primary" ).removeClass( "active" ).addClass( "current" );
-					$( "ul.tabs.primary li.active" ).hide();
+					$( "ul.tabs.primary li.active" ).css("display", "none");
 				},
 				exit: function() {
-					$( "ul.tabs.primary li.active" ).show();
-					$( "ul.tabs.primary li.current" ).hide();
+					$( "ul.tabs.primary li.active" ).css("display", "table");
+					$( "ul.tabs.primary li.current" ).css("display", "none");
 				}
 		});
 	}
diff --git a/drupal7/sites/all/themes/adminimal_theme/template.php b/drupal7/sites/all/themes/adminimal_theme/template.php
index 1403ca50..0c706777 100644
--- a/drupal7/sites/all/themes/adminimal_theme/template.php
+++ b/drupal7/sites/all/themes/adminimal_theme/template.php
@@ -61,7 +61,7 @@ function adminimal_preprocess_html(&$vars) {
   drupal_add_css($adminimal_path . '/css/tablet.css', array('group' => CSS_THEME, 'media' => $media_query_tablet, 'weight' => 1000));
 
   // Add custom CSS.
-  $custom_css_path = $adminimal_path . '/css/custom.css'; 
+  $custom_css_path = 'public://adminimal-custom.css';
   if (theme_get_setting('custom_css') && file_exists($custom_css_path)) {
     drupal_add_css($custom_css_path, array('group' => CSS_THEME, 'weight' => 9999, 'preprocess' => FALSE));
   }
diff --git a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--appearance.tpl.php b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--appearance.tpl.php
index 4f32be8b..fc74cdec 100644
--- a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--appearance.tpl.php
+++ b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--appearance.tpl.php
@@ -17,14 +17,21 @@
 
 	<?php print render($title_suffix); ?>
 
-	<?php print render($primary_local_tasks); ?>
+</div>
+
+<div id="navigation">
+
+  <?php if ($primary_local_tasks): ?>
+    <?php print render($primary_local_tasks); ?>
+  <?php endif; ?>
+
+  <?php if ($secondary_local_tasks): ?>
+    <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+  <?php endif; ?>
 
 </div>
 
 <div id="page">
-	<?php if ($secondary_local_tasks): ?>
-		<div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
-	<?php endif; ?>
 
 	<?php
 		// Get enabled themes.
diff --git a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--dashboard.tpl.php b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--dashboard.tpl.php
index 0f57c442..b6cb1719 100644
--- a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--dashboard.tpl.php
+++ b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--dashboard.tpl.php
@@ -17,14 +17,21 @@
 
 	<?php print render($title_suffix); ?>
 
-	<?php print render($primary_local_tasks); ?>
+</div>
+
+<div id="navigation">
+
+  <?php if ($primary_local_tasks): ?>
+    <?php print render($primary_local_tasks); ?>
+  <?php endif; ?>
+
+  <?php if ($secondary_local_tasks): ?>
+    <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+  <?php endif; ?>
 
 </div>
 
 <div id="page">
-	<?php if ($secondary_local_tasks): ?>
-		<div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
-	<?php endif; ?>
 
 	<div id="content" class="clearfix">
 		<div class="element-invisible"><a id="main-content"></a></div>
diff --git a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--modules.tpl.php b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--modules.tpl.php
index 4f32be8b..fc74cdec 100644
--- a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--modules.tpl.php
+++ b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--modules.tpl.php
@@ -17,14 +17,21 @@
 
 	<?php print render($title_suffix); ?>
 
-	<?php print render($primary_local_tasks); ?>
+</div>
+
+<div id="navigation">
+
+  <?php if ($primary_local_tasks): ?>
+    <?php print render($primary_local_tasks); ?>
+  <?php endif; ?>
+
+  <?php if ($secondary_local_tasks): ?>
+    <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+  <?php endif; ?>
 
 </div>
 
 <div id="page">
-	<?php if ($secondary_local_tasks): ?>
-		<div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
-	<?php endif; ?>
 
 	<?php
 		// Get enabled themes.
diff --git a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--reports--status.tpl.php b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--reports--status.tpl.php
index 4f32be8b..fc74cdec 100644
--- a/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--reports--status.tpl.php
+++ b/drupal7/sites/all/themes/adminimal_theme/templates/page--admin--reports--status.tpl.php
@@ -17,14 +17,21 @@
 
 	<?php print render($title_suffix); ?>
 
-	<?php print render($primary_local_tasks); ?>
+</div>
+
+<div id="navigation">
+
+  <?php if ($primary_local_tasks): ?>
+    <?php print render($primary_local_tasks); ?>
+  <?php endif; ?>
+
+  <?php if ($secondary_local_tasks): ?>
+    <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+  <?php endif; ?>
 
 </div>
 
 <div id="page">
-	<?php if ($secondary_local_tasks): ?>
-		<div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
-	<?php endif; ?>
 
 	<?php
 		// Get enabled themes.
diff --git a/drupal7/sites/all/themes/adminimal_theme/templates/page.tpl.php b/drupal7/sites/all/themes/adminimal_theme/templates/page.tpl.php
index 59d7b968..0765a9cd 100644
--- a/drupal7/sites/all/themes/adminimal_theme/templates/page.tpl.php
+++ b/drupal7/sites/all/themes/adminimal_theme/templates/page.tpl.php
@@ -17,14 +17,21 @@
 
 	<?php print render($title_suffix); ?>
 
-	<?php print render($primary_local_tasks); ?>
+</div>
+
+<div id="navigation">
+
+  <?php if ($primary_local_tasks): ?>
+    <?php print render($primary_local_tasks); ?>
+  <?php endif; ?>
+
+  <?php if ($secondary_local_tasks): ?>
+    <div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
+  <?php endif; ?>
 
 </div>
 
 <div id="page">
-	<?php if ($secondary_local_tasks): ?>
-		<div class="tabs-secondary clearfix"><ul class="tabs secondary"><?php print render($secondary_local_tasks); ?></ul></div>
-	<?php endif; ?>
 
 	<div id="content" class="clearfix">
 		<div class="element-invisible"><a id="main-content"></a></div>
diff --git a/drupal7/sites/all/themes/adminimal_theme/theme-settings.php b/drupal7/sites/all/themes/adminimal_theme/theme-settings.php
index e83bc334..904c00be 100644
--- a/drupal7/sites/all/themes/adminimal_theme/theme-settings.php
+++ b/drupal7/sites/all/themes/adminimal_theme/theme-settings.php
@@ -17,8 +17,31 @@
 function adminimal_form_system_theme_settings_alter(&$form, &$form_state) {
 
   // Get adminimal theme path.
+  global $base_url;
   $adminimal_path = drupal_get_path('theme', 'adminimal');
-  $custom_css_path = $adminimal_path . '/css/custom.css';
+  $old_css_path = $adminimal_path . '/css/custom.css';
+  $custom_css_path = 'public://adminimal-custom.css';
+  $custom_css_dir = str_replace($base_url . '/', "", file_create_url($custom_css_path));
+  $custom_css_url = file_create_url($custom_css_path);
+
+  // Try to create the adminimal-custom.css file automatically.
+  if (!file_exists($custom_css_path)) {
+
+    // Try to migrate from the old css.
+    if (file_exists($old_css_path)) {
+      file_unmanaged_copy($old_css_path, $custom_css_path, FILE_EXISTS_ERROR);
+    }
+    // Else create e new blank css file.
+    else {
+      file_unmanaged_save_data("", $custom_css_path, FILE_EXISTS_ERROR);
+    }
+
+  }
+
+  // Notify user to remove his old css file.
+  if (file_exists($old_css_path)) {
+    drupal_set_message(t('Please delete the old @css_location file, as its no longer used.', array('@css_location file' => $old_css_path)), 'warning');
+  }
 
   $form['adminimal_custom'] = array(
     '#type' => 'fieldset',
@@ -66,9 +89,8 @@ function adminimal_form_system_theme_settings_alter(&$form, &$form_state) {
 
   $form['adminimal_custom']['custom_css'] = array(
     '#type' => 'checkbox',
-    '#title' => t('Use "custom.css"'),
-    '#description' => t('Include custom.css file to override default Adminimal styles
-     or add additional styles without subthememing/hacking Adminimal Theme.'),
+    '#title' => t('Use "adminimal-custom.css"'),
+    '#description' => t('Include adminimal-custom.css file to override or add custom css code without subthememing/hacking Adminimal Theme.'),
     '#default_value' => theme_get_setting('custom_css'),
   );
 
@@ -86,14 +108,14 @@ function adminimal_form_system_theme_settings_alter(&$form, &$form_state) {
 
   if (file_exists($custom_css_path)) {
     $form['adminimal_custom']['adminimal_custom_check']['custom_css_description'] = array(
-      '#markup' => t('Custom CSS file Found in: !css', array('!css' => "<span class='css_path'>" . $custom_css_path . "</span>")),
+      '#markup' => t('Custom CSS file Found in: !css', array('!css' => "<span class='css_path'>" . $custom_css_dir . "</span>")),
       '#prefix' => '<div class="messages status custom_css_found">',
       '#suffix' => '</div>',
     );
   }
   else {
     $form['adminimal_custom']['adminimal_custom_check']['custom_css_not_found'] = array(
-      '#markup' => t('Custom CSS file not found. You must create the !css file manually.', array('!css' => "<span class='css_path'>" . $custom_css_path . "</span>")),
+      '#markup' => t('Custom CSS file not found. You must create the !css file manually.', array('!css' => "<span class='css_path'>" . $custom_css_dir . "</span>")),
       '#prefix' => '<div class="messages error custom_css_not_found">',
       '#suffix' => '</div>',
     );
