#53174, track tab should not be visible when tracker is switched off., patch by Ber

4.7.x
Gerhard Killesreiter 2006-04-08 17:08:45 +00:00
parent a6cb8d7adb
commit dba33bf190
2 changed files with 4 additions and 4 deletions

View File

@ -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);

View File

@ -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);