From 9e43afadc7f508564c0a449ecd507238192c0e8d Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sun, 11 Jul 2004 06:53:39 +0000 Subject: - Patch by Matt: made it possible to alias an URL multiple times. --- modules/tracker/tracker.module | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'modules/tracker/tracker.module') diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index bb77fcf59..fb7b5d674 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -17,11 +17,21 @@ function tracker_help($section) { * Implementation of hook_menu(). */ function tracker_menu() { + global $user; + $items = array(); $items[] = array('path' => 'tracker', 'title' => t('recent posts'), - 'callback' => 'tracker_page', - 'access' => user_access('access content'), + 'callback' => 'tracker_page', 'access' => user_access('access content'), 'weight' => 1); + + // Tabs: + if ($user->uid) { + $items[] = array('path' => 'tracker/all', 'title' => t('all recent posts'), + 'type' => MENU_DEFAULT_LOCAL_TASK); + $items[] = array('path' => "tracker/$user->uid", 'title' => t('my recent posts'), + 'type' => MENU_LOCAL_TASK); + } + return $items; } @@ -33,13 +43,6 @@ function tracker_page($uid = 0) { $output .= ''; - if ($user->uid) { - $output .= ''; - } - if ($uid) { $uid = check_query($uid); -- cgit v1.2.3