summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2007-01-24 14:48:36 +0000
committerDries Buytaert <dries@buytaert.net>2007-01-24 14:48:36 +0000
commit03752e35a41992c3d61f2591980020c87af257e7 (patch)
treedd8d9f51a47716785083591d82ca873c201c1057 /modules/blog
parentd407de4cec606623a5946805d2d42b580ccb116b (diff)
downloadbrdo-03752e35a41992c3d61f2591980020c87af257e7.tar.gz
brdo-03752e35a41992c3d61f2591980020c87af257e7.tar.bz2
- Patch #34755 by chx et al: faster menu system. HEAD is temporary broken and there is no upgrade path yet.
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module25
1 files changed, 12 insertions, 13 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index 3bf271881..d3e4a49c8 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -249,19 +249,18 @@ function blog_link($type, $node = NULL, $teaser = FALSE) {
/**
* Implementation of hook_menu().
*/
-function blog_menu($may_cache) {
- global $user;
- $items = array();
-
- if ($may_cache) {
- $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);
- }
+function blog_menu() {
+ $items['blog'] = array(
+ 'title' => t('Blogs'),
+ 'page callback' => 'blog_page',
+ 'access arguments' => array('access content'),
+ 'type' => MENU_SUGGESTED_ITEM,
+ );
+ $items['blog/%'] = array(
+ 'title' => t('My blog'),
+ 'page arguments' => array(1),
+ 'access arguments' => array('edit own blog'),
+ );
return $items;
}