summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/plugins.inc19
-rw-r--r--panels.module6
2 files changed, 22 insertions, 3 deletions
diff --git a/includes/plugins.inc b/includes/plugins.inc
index 84614ad..2724cb8 100644
--- a/includes/plugins.inc
+++ b/includes/plugins.inc
@@ -151,6 +151,7 @@ class panels_cache_object {
var $head = NULL;
var $css = NULL;
var $js = NULL;
+ var $tokens = NULL;
var $ready = FALSE;
/**
@@ -159,6 +160,7 @@ class panels_cache_object {
function panels_cache_object() {
$this->head = drupal_set_html_head();
$this->css = drupal_add_css();
+ $this->tokens = ctools_set_page_token();
foreach (array('header', 'footer') as $scope) {
$this->js[$scope] = drupal_add_js(NULL, NULL, $scope);
@@ -234,6 +236,16 @@ class panels_cache_object {
}
}
}
+
+ // And for tokens:
+ $tokens = ctools_set_page_token();
+ foreach ($this->tokens as $token => $argument) {
+ if (isset($tokens[$token])) {
+ unset($tokens);
+ }
+ }
+
+ $this->tokens = $tokens;
}
/**
@@ -253,6 +265,13 @@ class panels_cache_object {
call_user_func_array('drupal_add_js', $args);
}
}
+
+ if (!empty($this->tokens)) {
+ foreach ($this->tokens as $token => $key) {
+ list($type, $argument) = $key;
+ ctools_set_page_token($token, $type, $argument);
+ }
+ }
}
}
diff --git a/panels.module b/panels.module
index adfa4bd..f06206c 100644
--- a/panels.module
+++ b/panels.module
@@ -7,7 +7,7 @@
* Core functionality for the Panels engine.
*/
-define('PANELS_REQUIRED_CTOOLS_API', '1.1.0');
+define('PANELS_REQUIRED_CTOOLS_API', '1.1.1');
/**
* Returns the API version of Panels. This didn't exist in 1.
@@ -1020,8 +1020,8 @@ function panel_context_panels_cache_get($key) {
$handler = &$page->new_handler;
}
$cache = new stdClass();
-
- $cache->display = &panels_panel_context_get_display($handler);
+
+ $cache->display = &panels_panel_context_get_display($handler);
$cache->display->context = ctools_context_handler_get_all_contexts($page->task, $page->subtask, $handler);
$cache->display->cache_key = 'panel_context:' . $key;
$cache->content_types = panels_common_get_allowed_types('panels_page', $cache->display->context);