diff options
Diffstat (limited to 'modules/tracker/tracker.module')
-rw-r--r-- | modules/tracker/tracker.module | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 24951d50e..925c6b998 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -37,6 +37,13 @@ function tracker_menu($may_cache) { 'type' => MENU_LOCAL_TASK); } } + else { + if (arg(0) == 'user' && is_numeric(arg(1))) { + $items[] = array('path' => 'user/'. arg(1) .'/track', 'title' => t('track posts'), + 'callback' => 'tracker_track_user', 'access' => user_access('access content'), + 'type' => MENU_LOCAL_TASK); + } + } return $items; } @@ -44,6 +51,13 @@ function tracker_menu($may_cache) { /** * Menu callback. Prints a listing of active nodes on the site. */ +function tracker_track_user() { + tracker_page(arg(1)); +} + +/** + * Menu callback. Prints a listing of active nodes on the site. + */ function tracker_page($uid = 0) { global $user; @@ -90,10 +104,4 @@ function tracker_page($uid = 0) { print theme('page', $output); } -function tracker_user($type, &$edit, &$user) { - if ($type == 'view' && user_access('access content')) { - return array(t('History') => form_item(t('Recent posts'), l(t('recent posts'), "tracker/$user->uid"))); - } -} - ?> |