Skip to content

Commit

Permalink
0.5.8 rev 3789
Browse files Browse the repository at this point in the history
  • Loading branch information
nightflyza committed Sep 22, 2014
1 parent d4187ce commit 9ede58c
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion RELEASE
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.8 rev 3788
0.5.8 rev 3789
2 changes: 1 addition & 1 deletion userstats/config/modules.d/traffic
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
NAME="Traffic"
NEED=""
NEED="TRAFFIC_ENABLED"
2 changes: 2 additions & 0 deletions userstats/config/userstats.ini
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,5 @@ PAYMENTS_ENABLED=1
;Show additional virtual services in user profile?
VSERVICES_SHOW=0

;Show traffic stats module?
TRAFFIC_ENABLED=1
12 changes: 8 additions & 4 deletions userstats/modules/general/traffic/index.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?php

$user_ip=zbs_UserDetectIp('debug');
$user_login=zbs_UserGetLoginByIp($user_ip);

show_window(__('Traffic stats'),zbs_UserTraffStats($user_login));
$usConfig = zbs_LoadConfig();
if ($usConfig['TRAFFIC_ENABLED']) {
$user_ip = zbs_UserDetectIp('debug');
$user_login = zbs_UserGetLoginByIp($user_ip);

show_window(__('Traffic stats'), zbs_UserTraffStats($user_login));
} else {
show_window(__('Sorry'), __('This module is disabled'));
}
?>

0 comments on commit 9ede58c

Please sign in to comment.