equal
deleted
inserted
replaced
2 |
2 |
3 require('../stats-fe.php'); |
3 require('../stats-fe.php'); |
4 require('../graphs.php'); |
4 require('../graphs.php'); |
5 require('../timezone.php'); |
5 require('../timezone.php'); |
6 |
6 |
7 $first_channel = array_keys($stats_data['messages']); |
7 $channel_list = stats_channel_list(); |
8 $first_channel = $first_channel[0]; |
8 $first_channel = $channel_list[0]; |
9 $channel = ( isset($_REQUEST['channel']) && isset($stats_data['messages'][$_REQUEST['channel']]) ) ? $_REQUEST['channel'] : $first_channel; |
9 $channel = ( isset($_REQUEST['channel']) && in_array($_REQUEST['channel'], $channel_list) ) ? $_REQUEST['channel'] : $first_channel; |
10 |
10 |
11 // generate the data |
11 // generate the data |
12 // we're doing this by absolute hours, not by strictly "24 hours ago", e.g. on-the-hour stats |
12 // we're doing this by absolute hours, not by strictly "24 hours ago", e.g. on-the-hour stats |
13 $this_hour = gmmktime(gmdate('H'), 0, 0); |
13 $this_hour = gmmktime(gmdate('H'), 0, 0); |
14 $graphdata = array(); |
14 $graphdata = array(); |