summaryrefslogtreecommitdiff
path: root/modules/blog/blog.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r--modules/blog/blog.module33
1 files changed, 18 insertions, 15 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index d1a97da32..beec0eb5f 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -259,23 +259,26 @@ function blog_link($type, $node = 0, $main) {
/**
* Implementation of hook_menu().
*/
-function blog_menu() {
+function blog_menu($may_cache) {
global $user;
-
$items = array();
- $items[] = array('path' => 'node/add/blog', 'title' => t('blog entry'),
- 'access' => user_access('edit own blog'));
- $items[] = array('path' => 'blog', 'title' => t('blogs'),
- 'callback' => 'blog_page',
- 'access' => user_access('access content'),
- 'type' => MENU_SUGGESTED_ITEM);
- $items[] = array('path' => 'blog/'. $user->uid, 'title' => t('my blog'),
- 'access' => user_access('edit own blog'),
- 'type' => MENU_DYNAMIC_ITEM);
- $items[] = array('path' => 'blog/feed', 'title' => t('RSS feed'),
- 'callback' => 'blog_feed',
- 'access' => user_access('access content'),
- 'type' => MENU_CALLBACK);
+
+ if ($may_cache) {
+ $items[] = array('path' => 'node/add/blog', 'title' => t('blog entry'),
+ 'access' => user_access('edit own blog'));
+ $items[] = array('path' => 'blog', 'title' => t('blogs'),
+ 'callback' => 'blog_page',
+ 'access' => user_access('access content'),
+ 'type' => MENU_SUGGESTED_ITEM);
+ $items[] = array('path' => 'blog/feed', 'title' => t('RSS feed'),
+ 'callback' => 'blog_feed',
+ 'access' => user_access('access content'),
+ 'type' => MENU_CALLBACK);
+ $items[] = array('path' => 'blog/'. $user->uid, 'title' => t('my blog'),
+ 'access' => user_access('edit own blog'),
+ 'type' => MENU_DYNAMIC_ITEM);
+ }
+
return $items;
}