summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Boyer2008-08-31 23:28:25 (GMT)
committerSam Boyer2008-08-31 23:28:25 (GMT)
commit53dd59af7f0526c892197ed2bbb38a2a07a9a434 (patch)
treed3286e934dde6cb79b83704adc97a23a0b4be2ca
parent6b6bd6d190659af64db30208567e327ffcd916e2 (diff)
by douggreen: D6 menu and cache system compliance.
-rw-r--r--panels_simple_cache/panels_simple_cache.module32
1 files changed, 17 insertions, 15 deletions
diff --git a/panels_simple_cache/panels_simple_cache.module b/panels_simple_cache/panels_simple_cache.module
index 4c25410..b1336d9 100644
--- a/panels_simple_cache/panels_simple_cache.module
+++ b/panels_simple_cache/panels_simple_cache.module
@@ -11,21 +11,23 @@
/**
* Implementation of hook_menu().
*/
-/*
-function panels_simple_cache_menu($may_cache) {
- if ($may_cache) {
- $items[] = array(
- 'path' => 'admin/panels/simple-cache',
- 'title' => t('Simple cache'),
- 'access' => user_access('access administration pages') && user_access('use panels caching features'),
- 'type' => MENU_NORMAL_ITEM,
- 'callback' => 'panels_simple_cache_admin',
- 'description' => t('Information about Panels simple cache.'),
- );
- return $items;
- }
+function panels_simple_cache_menu() {
+ $items['admin/panels/simple-cache'] = array(
+ 'title' => 'Simple cache',
+ 'access' => 'panels_simple_cache_access',
+ 'type' => MENU_NORMAL_ITEM,
+ 'callback' => 'panels_simple_cache_admin',
+ 'description' => 'Information about Panels simple cache.',
+ );
+ return $items;
+}
+
+/**
+ * Access callback for the simple_cache administration menu.
+ */
+function panels_simple_cache_access() {
+ return user_access('access administration pages') && user_access('use panels caching features');
}
-*/
/**
* Page callback for the very short admin page.
@@ -77,7 +79,7 @@ function panels_simple_cache_get_cache($conf, $display, $args, $contexts, $pane
*/
function panels_simple_cache_set_cache($conf, $content, $display, $args, $contexts, $pane = NULL) {
$cid = panels_simple_cache_get_id($conf, $display, $args, $contexts, $pane);
- cache_set($cid, 'cache', serialize($content));
+ cache_set($cid, $content);
}
/**