diff --git a/modules/statistics.module b/modules/statistics.module index 1c79db6028d67ef64ebc24d2d1c44b7241134d15..47b42be8bd8563903fbd7b42d6bbbf835ee9b1dd 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -130,12 +130,12 @@ function statistics_menu($may_cache) { 'type' => MENU_CALLBACK); } else { - if (arg(0) == 'user' && is_numeric(arg(1))) { + if (arg(0) == 'user' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) { $items[] = array('path' => 'user/'. arg(1) .'/track/navigation', 'title' => t('track page visits'), 'callback' => 'statistics_user_tracker', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2); } - if (arg(0) == 'node' && is_numeric(arg(1))) { + if (arg(0) == 'node' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) { $items[] = array('path' => 'node/'. arg(1) .'/track', 'title' => t('track'), 'callback' => 'statistics_node_tracker', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2); diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 1c79db6028d67ef64ebc24d2d1c44b7241134d15..47b42be8bd8563903fbd7b42d6bbbf835ee9b1dd 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -130,12 +130,12 @@ function statistics_menu($may_cache) { 'type' => MENU_CALLBACK); } else { - if (arg(0) == 'user' && is_numeric(arg(1))) { + if (arg(0) == 'user' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) { $items[] = array('path' => 'user/'. arg(1) .'/track/navigation', 'title' => t('track page visits'), 'callback' => 'statistics_user_tracker', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2); } - if (arg(0) == 'node' && is_numeric(arg(1))) { + if (arg(0) == 'node' && is_numeric(arg(1)) && variable_get('statistics_enable_access_log', 0)) { $items[] = array('path' => 'node/'. arg(1) .'/track', 'title' => t('track'), 'callback' => 'statistics_node_tracker', 'access' => $access, 'type' => MENU_LOCAL_TASK, 'weight' => 2);