diff options
author | Dries Buytaert <dries@buytaert.net> | 2005-02-12 09:23:06 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2005-02-12 09:23:06 +0000 |
commit | 18bd62e71ec714ec33a3b3e3c1b19de8357a511f (patch) | |
tree | 5ca4bd82a6ca8f3e0cc3093b19f9980931ca576a /modules/blog.module | |
parent | 5b7ecb86501b2713106243108d72eb36afd48b1f (diff) | |
download | brdo-18bd62e71ec714ec33a3b3e3c1b19de8357a511f.tar.gz brdo-18bd62e71ec714ec33a3b3e3c1b19de8357a511f.tar.bz2 |
- Fixed bugs in RSS handling of blogs.
Diffstat (limited to 'modules/blog.module')
-rw-r--r-- | modules/blog.module | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/modules/blog.module b/modules/blog.module index 84ece24a5..62ffcadb5 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -65,18 +65,6 @@ function blog_help($section) { } /** - * Menu callback; displays an RSS feed containing recent blog entries. - */ -function blog_feed($uid = 0) { - if ($uid) { - blog_feed_user($uid); - } - else { - blog_feed_last(); - } -} - -/** * Displays an RSS feed containing recent blog entries of a given user. */ function blog_feed_user($uid = 0) { @@ -110,9 +98,18 @@ function blog_feed_last() { /** * Menu callback; displays a Drupal page containing recent blog entries. */ -function blog_page($uid = 0) { - if ($uid) { - blog_page_user($uid); +function blog_page($a = NULL, $b = NULL) { + + if (is_numeric($a)) { // $a is a user ID + if ($b == 'feed') { + blog_feed_user($a); + } + else { + blog_page_user($a); + } + } + else if ($a == 'feed') { + blog_feed_last(); } else { blog_page_last(); @@ -255,13 +252,6 @@ function blog_menu($may_cache) { '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; |