summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Skovgaard Gielfeldt2012-10-14 20:54:58 (GMT)
committer Thomas Skovgaard Gielfeldt2012-10-14 20:54:58 (GMT)
commitbf26ac51a19827bded44e2cb62078b8f877b7112 (patch)
treee18fef93e3b8384693689310da59e1d5e27faa80
parentcf0fb44e593dbbe958bee1ad185ec85ce995594b (diff)
Ensure inclusion of panels file.
Pass around display instead of renderer.
-rwxr-xr-xcache_graceful.module13
-rwxr-xr-xplugins/cache/graceful.inc2
2 files changed, 8 insertions, 7 deletions
diff --git a/cache_graceful.module b/cache_graceful.module
index 3cf77a3..58578d0 100755
--- a/cache_graceful.module
+++ b/cache_graceful.module
@@ -296,29 +296,30 @@ function _cache_graceful_views_execute($view) {
/**
* Render display or pane in background process.
*
- * @param object $renderer
+ * @param object $display
* @param object $pane
*
* @return
*/
-function _cache_graceful_panels_recache($renderer, $pane = NULL) {
+function _cache_graceful_panels_recache($display, $pane = NULL) {
+ ctools_include('plugins', 'panels');
if ($pane) {
ctools_include('content');
- $content = ctools_content_render($pane->type, $pane->subtype, $pane->configuration, array(), $renderer->display->args, $renderer->display->context);
+ $content = ctools_content_render($pane->type, $pane->subtype, $pane->configuration, array(), $display->args, $display->context);
if ($content) {
foreach (module_implements('panels_pane_content_alter') as $module) {
$function = $module . '_panels_pane_content_alter';
- $function($content, $pane, $renderer->display->args, $renderer->display->context, $renderer, $renderer->display);
+ $function($content, $pane, $display->args, $display->context, $display->renderer_handler, $display);
}
}
}
else {
- $content = $renderer->render_layout();
+ $content = $display->renderer_handler->render_layout();
}
$cache = new panels_cache_object();
$cache->set_content($content);
- panels_set_cached_content($cache, $renderer->display, $renderer->display->args, $renderer->display->context, $pane);
+ panels_set_cached_content($cache, $display, $display->args, $display->context, $pane);
$result = new stdClass();
$result->data = $cache;
return $result;
diff --git a/plugins/cache/graceful.inc b/plugins/cache/graceful.inc
index 2bd2b3a..664bef0 100755
--- a/plugins/cache/graceful.inc
+++ b/plugins/cache/graceful.inc
@@ -28,7 +28,7 @@ function cache_graceful_panels_cache_get_cache($conf, $display, $args, $contexts
$cid = cache_graceful_panels_cache_get_id($conf, $display, $args, $contexts, $pane);
$cache = cache_graceful(
$cid,
- array('_cache_graceful_panels_recache', $display->renderer_handler, $pane),
+ array('_cache_graceful_panels_recache', $display, $pane),
'cache',
$conf['lifetime'], $conf['prefetch'],
array('ensure_result' => TRUE)