summaryrefslogtreecommitdiff
path: root/modules/tracker.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-07-11 06:53:39 +0000
committerDries Buytaert <dries@buytaert.net>2004-07-11 06:53:39 +0000
commit9e43afadc7f508564c0a449ecd507238192c0e8d (patch)
treec272b14b10eec09cc69549a618fe2b14e15997e0 /modules/tracker.module
parentbbb41d0f7192cb236c061caeb2606847da094755 (diff)
downloadbrdo-9e43afadc7f508564c0a449ecd507238192c0e8d.tar.gz
brdo-9e43afadc7f508564c0a449ecd507238192c0e8d.tar.bz2
- Patch by Matt: made it possible to alias an URL multiple times.
Diffstat (limited to 'modules/tracker.module')
-rw-r--r--modules/tracker.module21
1 files changed, 12 insertions, 9 deletions
diff --git a/modules/tracker.module b/modules/tracker.module
index bb77fcf59..fb7b5d674 100644
--- a/modules/tracker.module
+++ b/modules/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 .= '<ul>';
- $output .= ' <li>'. l(t('My active posts and discussions'), "tracker/$user->uid") .'</li>';
- $output .= ' <li>'. l(t('All active posts and discussions'), 'tracker') .'</li>';
- $output .= '</ul>';
- }
-
if ($uid) {
$uid = check_query($uid);