summaryrefslogtreecommitdiffstats
path: root/modules/statistics
diff options
context:
space:
mode:
Diffstat (limited to 'modules/statistics')
-rwxr-xr-xmodules/statistics/bin/loganalyzer.php2
-rw-r--r--modules/statistics/lib/AccessCheck.php4
-rw-r--r--modules/statistics/lib/Aggregator.php35
-rw-r--r--modules/statistics/lib/DateHandler.php16
-rw-r--r--modules/statistics/lib/DateHandlerMonth.php20
-rw-r--r--modules/statistics/lib/Graph/GoogleCharts.php11
-rw-r--r--modules/statistics/lib/LogCleaner.php16
-rw-r--r--modules/statistics/lib/LogParser.php3
-rw-r--r--modules/statistics/lib/RatioDataset.php13
-rw-r--r--modules/statistics/lib/Ruleset.php1
-rw-r--r--modules/statistics/lib/StatDataset.php26
-rw-r--r--modules/statistics/lib/Statistics/Rulesets/BaseRule.php1
-rw-r--r--modules/statistics/templates/statistics-tpl.php23
-rw-r--r--modules/statistics/www/showstats.php1
14 files changed, 27 insertions, 145 deletions
diff --git a/modules/statistics/bin/loganalyzer.php b/modules/statistics/bin/loganalyzer.php
index 7ea016e..7186890 100755
--- a/modules/statistics/bin/loganalyzer.php
+++ b/modules/statistics/bin/loganalyzer.php
@@ -11,7 +11,7 @@ require_once($baseDir . '/lib/_autoload.php');
/* Initialize the configuration. */
SimpleSAML_Configuration::setConfigDir($baseDir . '/config');
-SimpleSAML_Utilities::initTimezone();
+SimpleSAML\Utils\Time::initTimezone();
$progName = array_shift($argv);
$debug = FALSE;
diff --git a/modules/statistics/lib/AccessCheck.php b/modules/statistics/lib/AccessCheck.php
index 92d1f90..4d393b8 100644
--- a/modules/statistics/lib/AccessCheck.php
+++ b/modules/statistics/lib/AccessCheck.php
@@ -28,7 +28,7 @@ class sspmod_statistics_AccessCheck {
return;
}
- if (SimpleSAML_Utilities::isAdmin()) {
+ if (SimpleSAML\Utils\Auth::isAdmin()) {
// User logged in as admin. OK.
SimpleSAML_Logger::debug('Statistics auth - logged in as admin, access granted');
return;
@@ -36,7 +36,7 @@ class sspmod_statistics_AccessCheck {
if (!isset($authsource)) {
// If authsource is not defined, init admin login.
- SimpleSAML_Utilities::requireAdmin();
+ SimpleSAML\Utils\Auth::requireAdmin();
}
/* We are using an authsource for login. */
diff --git a/modules/statistics/lib/Aggregator.php b/modules/statistics/lib/Aggregator.php
index f588ca6..6806724 100644
--- a/modules/statistics/lib/Aggregator.php
+++ b/modules/statistics/lib/Aggregator.php
@@ -122,7 +122,7 @@ class sspmod_statistics_Aggregator {
echo("----------------------------------------\n");
echo('Log line: ' . $logline . "\n");
echo('Date parse [' . substr($logline, 0, $this->statconfig->getValue('datelength', 15)) . '] to [' . date(DATE_RFC822, $epoch) . ']' . "\n");
- print_r($content);
+ echo htmlentities(print_r($content, true));
if ($i >= 13) exit;
}
@@ -145,17 +145,15 @@ class sspmod_statistics_Aggregator {
if ($type !== 'aggregate') continue;
foreach($this->timeres AS $tres => $tresconfig ) {
-
- // echo 'Comparing action: [' . $rule['action'] . '] with [' . $action . ']' . "\n";
+
$dh = 'default';
if (isset($tresconfig['customDateHandler'])) $dh = $tresconfig['customDateHandler'];
$timeslot = $datehandler['default']->toSlot($epoch, $tresconfig['slot']);
- $fileslot = $datehandler[$dh]->toSlot($epoch, $tresconfig['fileslot']); //print_r($content);
+ $fileslot = $datehandler[$dh]->toSlot($epoch, $tresconfig['fileslot']);
if (isset($rule['action']) && ($action !== $rule['action'])) continue;
-
- #$difcol = trim($content[$rule['col']]); // echo '[...' . $difcol . '...]';
+
$difcol = self::getDifCol($content, $rule['col']);
if (!isset($results[$rulename][$tres][$fileslot][$timeslot]['_'])) $results[$rulename][$tres][$fileslot][$timeslot]['_'] = 0;
@@ -207,9 +205,7 @@ class sspmod_statistics_Aggregator {
public function store($results) {
-
- // print_r($results); // exit;
-
+
$datehandler = array(
'default' => new sspmod_statistics_DateHandler($this->offset),
'month' => new sspmod_statistics_DateHandlerMonth($this->offset),
@@ -217,11 +213,7 @@ class sspmod_statistics_Aggregator {
// Iterate the first level of results, which is per rule, as defined in the config.
foreach ($results AS $rulename => $timeresdata) {
-
- // $timeresl = array_keys($timeresdata);
- //
- // print_r($timeresl); exit;
-
+
// Iterate over time resolutions
foreach($timeresdata AS $tres => $resres) {
@@ -240,7 +232,6 @@ class sspmod_statistics_Aggregator {
// The last slot.
$maxslot = $slotlist[count($slotlist)-1];
- #print_r($slotlist);
// Get start and end slot number within the file, based on the fileslot.
$start = (int)$datehandler['default']->toSlot(
@@ -249,38 +240,28 @@ class sspmod_statistics_Aggregator {
$end = (int)$datehandler['default']->toSlot(
$datehandler[$dh]->fromSlot($fileno+1, $this->timeres[$tres]['fileslot']),
$this->timeres[$tres]['slot']);
-
- // echo('from slot ' . $start . ' to slot ' . $end . ' maxslot ' . $maxslot . "\n");
- // print_r($slotlist);
- // exit;
-
+
// Fill in missing entries and sort file results
$filledresult = array();
for ($slot = $start; $slot < $end; $slot++) {
if (array_key_exists($slot, $fileres)) {
$filledresult[$slot] = $fileres[$slot];
} else {
- #echo('SLot [' . $slot . '] of [' . $maxslot . ']' . "\n");
if ($lastfile == $fileno && $slot > $maxslot) {
$filledresult[$slot] = array('_' => NULL);
} else {
$filledresult[$slot] = array('_' => 0);
- }
+ }
}
- # print_r($filledresult[$slot]);
- # = (isset($fileres[$slot])) ? $fileres[$slot] : array('_' => NULL);
}
- // print_r($filledresult); exit;
$filename = $this->statdir . '/' . $rulename . '-' . $tres . '-' . $fileno . '.stat';
if (file_exists($filename)) {
- // echo('Reading existing file: ' . $filename . "\n");
$previousData = unserialize(file_get_contents($filename));
$filledresult = $this->cummulateData($previousData, $filledresult);
}
// store file
- # echo('Writing to file: ' . $filename . "\n");
file_put_contents($filename, serialize($filledresult), LOCK_EX);
}
diff --git a/modules/statistics/lib/DateHandler.php b/modules/statistics/lib/DateHandler.php
index 63ecacb..271d5a7 100644
--- a/modules/statistics/lib/DateHandler.php
+++ b/modules/statistics/lib/DateHandler.php
@@ -5,7 +5,7 @@
*/
class sspmod_statistics_DateHandler {
- private $offset;
+ protected $offset;
/**
* Constructor
@@ -27,8 +27,6 @@ class sspmod_statistics_DateHandler {
}
public function fromSlot($slot, $slotsize) {
- // echo("slot $slot slotsize $slotsize offset " . $this->offset);
- // throw new Exception();
$temp = $slot*$slotsize - $this->offset;
$dst = $this->getDST($temp);
return $slot*$slotsize - $this->offset - $dst;
@@ -49,16 +47,4 @@ class sspmod_statistics_DateHandler {
$text .= $this->prettyDateSlot($to, $slotsize, $dateformat);
return $text;
}
-
}
-
-// $datestr = substr($logline,0,$datenumbers);
-// #$datestr = substr($logline,0,23);
-// $timestamp = parse15($datestr) + $offset;
-// $restofline = substr($logline,$datenumbers+1);
-// $restcols = split(' ', $restofline);
-// $action = $restcols[5];
-
-// print_r($timestamp);
-// print_r($restcols); if ($i++ > 5) exit;
-
diff --git a/modules/statistics/lib/DateHandlerMonth.php b/modules/statistics/lib/DateHandlerMonth.php
index 5520a6a..c7f0fae 100644
--- a/modules/statistics/lib/DateHandlerMonth.php
+++ b/modules/statistics/lib/DateHandlerMonth.php
@@ -5,8 +5,6 @@
*/
class sspmod_statistics_DateHandlerMonth extends sspmod_statistics_DateHandler {
-
-
/**
* Constructor
*
@@ -19,10 +17,8 @@ class sspmod_statistics_DateHandlerMonth extends sspmod_statistics_DateHandler {
public function toSlot($epoch, $slotsize) {
$dsttime = $this->getDST($epoch) + $epoch;
- $parsed = getdate($dsttime);
- // print_r($parsed);
+ $parsed = getdate($dsttime);
$slot = (($parsed['year'] - 2000) * 12) + $parsed['mon'] - 1;
- // echo('converting ' . $epoch . ' to ' . $slot ); exit;
return $slot;
}
@@ -32,7 +28,6 @@ class sspmod_statistics_DateHandlerMonth extends sspmod_statistics_DateHandler {
$year = 2000 + floor($slot / 12);
$epoch = mktime(0, 0, 0, $month + 1, 1, $year, FALSE);
- // echo('epoch ' . $epoch . ' from slot '. $slot . " year " . $year . " month " . $month . "\n");
return $epoch;
}
@@ -43,17 +38,4 @@ class sspmod_statistics_DateHandlerMonth extends sspmod_statistics_DateHandler {
return $year . '-' . $month;
}
-
-
}
-
-// $datestr = substr($logline,0,$datenumbers);
-// #$datestr = substr($logline,0,23);
-// $timestamp = parse15($datestr) + $offset;
-// $restofline = substr($logline,$datenumbers+1);
-// $restcols = split(' ', $restofline);
-// $action = $restcols[5];
-
-// print_r($timestamp);
-// print_r($restcols); if ($i++ > 5) exit;
-
diff --git a/modules/statistics/lib/Graph/GoogleCharts.php b/modules/statistics/lib/Graph/GoogleCharts.php
index 385068e..cf1564c 100644
--- a/modules/statistics/lib/Graph/GoogleCharts.php
+++ b/modules/statistics/lib/Graph/GoogleCharts.php
@@ -46,13 +46,11 @@ class sspmod_statistics_Graph_GoogleCharts {
if($v >= 0 && $v <= 100){
$first = substr($extended_table, intval( ($delta*$v/100) / $size),1);
$second = substr($extended_table, intval( ($delta*$v/100) % $size), 1);
- $chardata .= "$first$second";
- #echo '<p>encoding ' . $v . ' to ' . $first . ' ' . $second . '';
+ $chardata .= "$first$second";
} else {
$chardata .= '__'; // Value out of max range;
}
- }
- #echo ' encoding ' . join(' ', $values) . ' to ' . $chardata; exit;
+ }
return($chardata);
}
@@ -105,7 +103,6 @@ class sspmod_statistics_Graph_GoogleCharts {
'&chd=' . $this->encodedata($datasets) .
// Fill area...
-# $this->getFillArea($datasets) .
'&chco=ff5c00,cca600' .
'&chls=1,1,0|1,6,3' .
@@ -113,9 +110,7 @@ class sspmod_statistics_Graph_GoogleCharts {
'&cht=lc' .
$labeld .
'&chxl=0:|' . $this->encodeaxis($axis) . # . $'|1:||top' .
- '&chxp=0,' . join(',', $axispos) .
-# '&chxp=0,0.3,0.4' .
-# '&chm=R,CCCCCC,0,0.25,0.5' .
+ '&chxp=0,' . join(',', $axispos) .
'&chg=' . (2400/(count($datasets[0])-1)) . ',-1,3,3'; // lines
return $url;
}
diff --git a/modules/statistics/lib/LogCleaner.php b/modules/statistics/lib/LogCleaner.php
index 55c7493..652dc67 100644
--- a/modules/statistics/lib/LogCleaner.php
+++ b/modules/statistics/lib/LogCleaner.php
@@ -46,9 +46,7 @@ class sspmod_statistics_LogCleaner {
$file = fopen($this->inputfile, 'r');
- #$logfile = file($this->inputfile, FILE_IGNORE_NEW_LINES );
-
-
+
$logparser = new sspmod_statistics_LogParser(
$this->statconfig->getValue('datestart', 0), $this->statconfig->getValue('datelength', 15), $this->statconfig->getValue('offsetspan', 44)
);
@@ -78,7 +76,6 @@ class sspmod_statistics_LogCleaner {
}
$trackid = $content[4];
- #echo "trackid: " . $content[4] . "\n";
if(!isset($sessioncounter[$trackid])) $sessioncounter[$trackid] = 0;
$sessioncounter[$trackid]++;
@@ -88,7 +85,7 @@ class sspmod_statistics_LogCleaner {
echo("----------------------------------------\n");
echo('Log line: ' . $logline . "\n");
echo('Date parse [' . substr($logline, 0, $this->statconfig->getValue('datelength', 15)) . '] to [' . date(DATE_RFC822, $epoch) . ']' . "\n");
- print_r($content);
+ echo htmlentities(print_r($content, true));
if ($i >= 13) exit;
}
@@ -105,8 +102,7 @@ class sspmod_statistics_LogCleaner {
foreach($sessioncounter AS $trackid => $sc) {
if($sc > 200) $todelete[] = $trackid;
}
-
- #print_r($histogram);
+
return $todelete;
}
@@ -122,8 +118,7 @@ class sspmod_statistics_LogCleaner {
throw new Exception('Statistics module: input file do not exists [' . $this->inputfile . ']');
$file = fopen($this->inputfile, 'r');
- #$logfile = file($this->inputfile, FILE_IGNORE_NEW_LINES );
-
+
/* Open the output file in a way that guarantees that we will not overwrite a random file. */
if (file_exists($outputfile)) {
/* Delete existing output file. */
@@ -157,10 +152,7 @@ class sspmod_statistics_LogCleaner {
$trackid = $content[4];
if (in_array($trackid, $todelete)) {
- #echo "Deleting entry with trackid: $trackid \n";
continue;
- } else {
- #echo "NOT Deleting entry with trackid: $trackid \n";
}
fputs($outfile, $logline);
diff --git a/modules/statistics/lib/LogParser.php b/modules/statistics/lib/LogParser.php
index d0d54ca..bde18db 100644
--- a/modules/statistics/lib/LogParser.php
+++ b/modules/statistics/lib/LogParser.php
@@ -38,9 +38,6 @@ class sspmod_statistics_LogParser {
$year = gmdate('Y', $epoch) - 1;
$epoch = gmmktime($hour, $minute, $second, $month, $day, $year);
}
-
-// echo 'debug ' . $line . "\n";
-// echo 'debug [' . substr($line, 0, $this->datelength) . '] => [' . $epoch . ']' . "\n";
return $epoch;
}
diff --git a/modules/statistics/lib/RatioDataset.php b/modules/statistics/lib/RatioDataset.php
index 9c1314c..653fc88 100644
--- a/modules/statistics/lib/RatioDataset.php
+++ b/modules/statistics/lib/RatioDataset.php
@@ -34,7 +34,6 @@ class sspmod_statistics_RatioDataset extends sspmod_statistics_StatDataset {
asort($this->summary);
$this->summary = array_reverse($this->summary, TRUE);
- // echo '<pre>'; print_r($summaryDataset); exit;
}
private function ag($k, $a) {
@@ -49,7 +48,6 @@ class sspmod_statistics_RatioDataset extends sspmod_statistics_StatDataset {
public function combine($result1, $result2) {
-
$combined = array();
foreach($result2 AS $tick => $val) {
@@ -62,17 +60,6 @@ class sspmod_statistics_RatioDataset extends sspmod_statistics_StatDataset {
}
}
-
- // echo('<pre>');
- // echo('combine 1 ');
- // print_r($result1);
- // echo('combine 2 ');
- // print_r($result2);
- // echo('combineed ');
- // print_r($combined);
- //
- // exit;
-
return $combined;
}
diff --git a/modules/statistics/lib/Ruleset.php b/modules/statistics/lib/Ruleset.php
index f237249..0af00dd 100644
--- a/modules/statistics/lib/Ruleset.php
+++ b/modules/statistics/lib/Ruleset.php
@@ -51,7 +51,6 @@ class sspmod_statistics_Ruleset {
foreach ($this->availrules AS $key) {
$available_rules[$key] = array('name' => $statrules[$key]['name'], 'descr' => $statrules[$key]['descr']);
}
- // echo('<pre>'); print_r($available_rules); exit;
$this->availrulenames = $available_rules;
}
diff --git a/modules/statistics/lib/StatDataset.php b/modules/statistics/lib/StatDataset.php
index 1ea4f1a..fab589d 100644
--- a/modules/statistics/lib/StatDataset.php
+++ b/modules/statistics/lib/StatDataset.php
@@ -65,7 +65,6 @@ class sspmod_statistics_StatDataset {
public function setDelimiter($delimiter = '_') {
if (empty($delimiter)) $delimiter = '_';
$this->delimiter = $delimiter;
- // echo 'delimiter set to ' . $delimiter; exit;
}
public function getDelimiter() {
if ($this->delimiter === '_') return NULL;
@@ -79,8 +78,7 @@ class sspmod_statistics_StatDataset {
*/
$slotsize = $this->ruleconfig->getValue('slot');
$dateformat_period = $this->timeresconfig->getValue('dateformat-period');
- $dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
- // $axislabelint = $this->ruleconfig->getValue('axislabelint');
+ $dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
$maxvalue = 0; $maxvaluetime = NULL;
@@ -96,12 +94,11 @@ class sspmod_statistics_StatDataset {
public function getDebugData() {
$debugdata = array();
-
+
$slotsize = $this->timeresconfig->getValue('slot');
$dateformat_period = $this->timeresconfig->getValue('dateformat-period');
- $dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
- // $axislabelint = $this->ruleconfig->getValue('axislabelint');
-
+ $dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
+
foreach($this->results AS $slot => &$res) {
$debugdata[$slot] = array($this->datehandlerTick->prettyDateSlot($slot, $slotsize, $dateformat_intra), $res[$this->delimiter] );
}
@@ -125,7 +122,6 @@ class sspmod_statistics_StatDataset {
}
asort($this->summary);
$this->summary = array_reverse($this->summary, TRUE);
- // echo '<pre>'; print_r($summaryDataset); exit;
}
public function getTopDelimiters() {
@@ -195,8 +191,7 @@ class sspmod_statistics_StatDataset {
// check if there should be an axis here...
if ( $slot % $axislabelint == 0) {
$axis[] = $this->datehandlerTick->prettyDateSlot($slot, $slotsize, $dateformat_intra);
- $axispos[] = (($i)/($xentries-1));
- // echo 'set axis on [' . $slot . '] = [' . $datehandler->prettyDateSlot($slot, $slotsize, $dateformat_intra) . ']';
+ $axispos[] = (($i)/($xentries-1));
}
$lastslot = $slot;
$i++;
@@ -218,18 +213,13 @@ class sspmod_statistics_StatDataset {
$dateformat_period = $this->timeresconfig->getValue('dateformat-period');
$dateformat_intra = $this->timeresconfig->getValue('dateformat-intra');
$axislabelint = $this->timeresconfig->getValue('axislabelint');
-
- #$max = 25;
+
$xentries = count($this->results);
$lastslot = 0; $i = 0;
$dataset = array();
foreach($this->results AS $slot => $res) {
- #echo ('<p>new value: ' . number_format(100*$res[$delimiter] / $max, 2));
- // echo('<hr><p>delimiter [<tt>' .$delimiter . '</tt>].');
- // echo('<p>Res <pre>'); print_r($res); echo( '</pre>');
- // echo('<p>return <pre>'); print_r(isset($res[$delimiter]) ? $res[$delimiter] : 'NO'); echo('</pre>');
if (array_key_exists($this->delimiter, $res)) {
if ($res[$this->delimiter] === NULL) {
$dataset[] = -1;
@@ -239,8 +229,6 @@ class sspmod_statistics_StatDataset {
} else {
$dataset[] = '0';
}
- // foreach(array_keys($res) AS $nd) $availdelimiters[$nd] = 1;
-
$lastslot = $slot;
$i++;
}
@@ -294,7 +282,7 @@ class sspmod_statistics_StatDataset {
$statdir = $this->statconfig->getValue('statdir');
$resarray = array();
- $rules = SimpleSAML_Utilities::arrayize($this->ruleid);
+ $rules = SimpleSAML\Utils\Arrays::arrayize($this->ruleid);
foreach($rules AS $rule) {
// Get file and extract results.
$resultFileName = $statdir . '/' . $rule . '-' . $this->timeres . '-'. $this->fileslot . '.stat';
diff --git a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
index 6c2068f..65099c8 100644
--- a/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
+++ b/modules/statistics/lib/Statistics/Rulesets/BaseRule.php
@@ -39,7 +39,6 @@ class sspmod_statistics_Statistics_Rulesets_BaseRule {
if (array_key_exists($tres, $this->available))
$available_times[$tres] = $tresconfig['name'];
}
- // echo('<pre>'); print_r($available_times); exit;
return $available_times;
}
diff --git a/modules/statistics/templates/statistics-tpl.php b/modules/statistics/templates/statistics-tpl.php
index 6fe94a4..73f5e5f 100644
--- a/modules/statistics/templates/statistics-tpl.php
+++ b/modules/statistics/templates/statistics-tpl.php
@@ -3,8 +3,6 @@ $this->data['header'] = 'SimpleSAMLphp Statistics';
$this->data['jquery'] = array('version' => '1.6', 'core' => TRUE, 'ui' => TRUE, 'css' => TRUE);
-// $this->data['hideLanguageBar'] = TRUE;
-
$this->data['head'] ='';
$this->data['head'] .= '<script type="text/javascript">
$(document).ready(function() {
@@ -92,11 +90,6 @@ td.datacontent {
echo('<h1>'. $this->data['available.rules'][$this->data['selected.rule']]['name'] . '</h1>');
echo('<p>' . $this->data['available.rules'][$this->data['selected.rule']]['descr'] . '</p>');
-// echo('<pre>');
-// print_r($this->data);
-// exit;
-
-
// Report settings
echo '<table class="selecttime" style="width: 100%; border: 1px solid #ccc; background: #eee; margin: 1px 0px; padding: 0px">';
echo('<tr><td style="width: 50px; padding: 0px"><img style="margin: 0px" src="../../resources/icons/crystal_project/kchart.32x32.png" alt="Report settings" /></td>');
@@ -119,9 +112,6 @@ echo '</td>';
// Select delimiter
echo '<td style="text-align: right">';
-
-#echo('<pre>here'); print_r($this->data['delimiterPresentation']); echo('</pre>');
-
echo '<form style="display: inline">';
echo getBaseURL($this, 'post', 'd');
echo '<select onChange="submit();" name="d">';
@@ -168,7 +158,6 @@ if (isset($this->data['available.times.prev'])) {
echo '<td style="text-align: right">';
echo '<form style="display: inline">';
echo getBaseURL($this, 'post', 'res');
-// echo '<input type="hidden" name="rule" value="' . $this->data['selected.rule'] . '" />';
echo '<select onChange="submit();" name="res">';
foreach ($this->data['available.timeres'] AS $key => $timeresname) {
if ($key == $this->data['selected.timeres']) {
@@ -184,7 +173,6 @@ echo '</td>';
echo '<td style="text-align: left">';
echo '<form style="display: inline">';
echo getBaseURL($this, 'post', 'time');
-// echo '<input type="hidden" name="rule" value="' . $this->data['selected.rule'] . '" />';
echo '<select onChange="submit();" name="time">';
foreach ($this->data['available.times'] AS $key => $timedescr) {
if ($key == $this->data['selected.time']) {
@@ -272,18 +260,7 @@ foreach ( $this->data['summaryDataset'] as $key => $value ) {
echo '</table></div>';
// - - - - - - - End table view - - - - - - -
-
-//
-// echo('<pre>');
-// print_r($this->data['results']);
-// exit;
-
-
echo '<div id="debug" >';
-
-#echo $this->data['selected.time'];
-#echo '<input style="width: 80%" value="' . htmlspecialchars($this->data['imgurl']) . '" />';
-
echo '<table class="timeseries" style="">';
echo('<tr><th>Time</th><th>Total</th>');
foreach($this->data['topdelimiters'] AS $key) {
diff --git a/modules/statistics/www/showstats.php b/modules/statistics/www/showstats.php
index 0af0e9d..ed4c443 100644
--- a/modules/statistics/www/showstats.php
+++ b/modules/statistics/www/showstats.php
@@ -62,7 +62,6 @@ $maxes[] = $dataset->getMax();
if (isset($preferRule2)) {
$statrule = $ruleset->getRule($preferRule2);
-# $rule2 = $statrule->getRuleID();
$dataset2 = $statrule->getDataset($preferTimeRes, $preferTime);
$dataset2->aggregateSummary();
$dataset2->calculateMax();