From c47ca1978296e6d8e090780681c22a12fad7f035 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Tue, 24 Feb 2009 07:03:14 +0000
Subject: [PATCH] cleanup and fix notice warnings

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1308 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/statistics/templates/statistics-tpl.php | 9 ---------
 modules/statistics/www/showstats.php            | 6 ++----
 2 files changed, 2 insertions(+), 13 deletions(-)

diff --git a/modules/statistics/templates/statistics-tpl.php b/modules/statistics/templates/statistics-tpl.php
index aad0fdc5a..9fa4a51f1 100644
--- a/modules/statistics/templates/statistics-tpl.php
+++ b/modules/statistics/templates/statistics-tpl.php
@@ -1,15 +1,6 @@
 <?php
 $this->data['header'] = 'SimpleSAMLphp Statistics';
 
-
-/*
-echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/js/tabs/addclasskillclass.js"></script>';
-echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/js/tabs/attachevent.js"></script>';
-echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/js/tabs/addcss.js"></script>';
-echo '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/js/tabs/tabtastic.js"></script>';
-*/
-
-
 $this->data['head']  = '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery.js"></script>';
 $this->data['head'] .= '<script type="text/javascript" src="/' . $this->data['baseurlpath'] . 'resources/jquery-ui.js"></script>';
 $this->data['head'] .= '<link rel="stylesheet" media="screen" type="text/css" href="/' . $this->data['baseurlpath'] . 'resources/uitheme/jquery-ui-themeroller.css" />';
diff --git a/modules/statistics/www/showstats.php b/modules/statistics/www/showstats.php
index 76f8e358d..bf8327caa 100644
--- a/modules/statistics/www/showstats.php
+++ b/modules/statistics/www/showstats.php
@@ -92,7 +92,8 @@ if (isset($_REQUEST['d'])) {
 $maxvalue = 0;
 $maxvaluetime = 0;
 $debugdata = array();
-foreach($results AS $slot => $res) {
+foreach($results AS $slot => &$res) {
+	if (!array_key_exists($delimiter, $res)) $res[$delimiter] = 0;
 	if ($res[$delimiter] > $maxvalue) { 
 		$maxvaluetime = $datehandler->prettyDateSlot($slot, $slotsize, $dateformat_intra); 
 	}
@@ -167,6 +168,3 @@ $t->data['summaryDataset'] = $summaryDataset;
 $t->data['availdelimiters'] = array_keys($availdelimiters);
 $t->show();
 
-
-
-?>
\ No newline at end of file
-- 
GitLab