summaryrefslogtreecommitdiff
path: root/modules/tracker/tracker.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/tracker/tracker.module')
-rw-r--r--modules/tracker/tracker.module25
1 files changed, 13 insertions, 12 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module
index ef406194f..24951d50e 100644
--- a/modules/tracker/tracker.module
+++ b/modules/tracker/tracker.module
@@ -21,20 +21,21 @@ function tracker_help($section) {
/**
* Implementation of hook_menu().
*/
-function tracker_menu() {
+function tracker_menu($may_cache) {
global $user;
-
$items = array();
- $items[] = array('path' => 'tracker', 'title' => t('recent posts'),
- '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);
+
+ if ($may_cache) {
+ $items[] = array('path' => 'tracker', 'title' => t('recent posts'),
+ 'callback' => 'tracker_page', 'access' => user_access('access content'),
+ 'weight' => 1);
+
+ 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;