var $head = NULL;
var $css = NULL;
var $js = NULL;
+ var $tokens = NULL;
var $ready = FALSE;
/**
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);
}
}
}
+
+ // And for tokens:
+ $tokens = ctools_set_page_token();
+ foreach ($this->tokens as $token => $argument) {
+ if (isset($tokens[$token])) {
+ unset($tokens);
+ }
+ }
+
+ $this->tokens = $tokens;
}
/**
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);
+ }
+ }
}
}
* 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.
$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);