slitaz-forge rev 319

graphs.php: avoid an undefined index
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 16 12:46:27 2012 +0200 (2012-07-16)
parents c6801d066386
children d35926c24766
files chub/web/graphs.php mirror/info/graphs.php tank/web/graphs.php
line diff
     1.1 --- a/chub/web/graphs.php	Sun Jul 15 14:20:00 2012 +0200
     1.2 +++ b/chub/web/graphs.php	Mon Jul 16 12:46:27 2012 +0200
     1.3 @@ -60,7 +60,7 @@
     1.4  	echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
     1.5  	one_graphic($img."-day.png",$res." daily");
     1.6  	echo "</a>";
     1.7 -	if ($_GET['stats'] == $res) {
     1.8 +	if (isset($_GET['stats']) && $_GET['stats'] == $res) {
     1.9  		one_graphic($img."-week.png",$res." weekly");
    1.10  		one_graphic($img."-month.png",$res." monthly");
    1.11  		one_graphic($img."-year.png",$res." yearly");
     2.1 --- a/mirror/info/graphs.php	Sun Jul 15 14:20:00 2012 +0200
     2.2 +++ b/mirror/info/graphs.php	Mon Jul 16 12:46:27 2012 +0200
     2.3 @@ -95,7 +95,7 @@
     2.4  	echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
     2.5  	one_graphic($img."-day.png",$res." daily");
     2.6  	echo "</a>";
     2.7 -	if ($_GET['stats'] == $res) {
     2.8 +	if (isset($_GET['stats']) && $_GET['stats'] == $res) {
     2.9  		one_graphic($img."-week.png",$res." weekly");
    2.10  		one_graphic($img."-month.png",$res." monthly");
    2.11  		one_graphic($img."-year.png",$res." yearly");
     3.1 --- a/tank/web/graphs.php	Sun Jul 15 14:20:00 2012 +0200
     3.2 +++ b/tank/web/graphs.php	Mon Jul 16 12:46:27 2012 +0200
     3.3 @@ -68,7 +68,7 @@
     3.4  	echo "<a href=\"".$myurl."?stats=".$res."#".$res."\">\n";
     3.5  	one_graphic($img."-day.png",$res." daily");
     3.6  	echo "</a>";
     3.7 -	if ($_GET['stats'] == $res) {
     3.8 +	if (isset($_GET['stats']) && $_GET['stats'] == $res) {
     3.9  		one_graphic($img."-week.png",$res." weekly");
    3.10  		one_graphic($img."-month.png",$res." monthly");
    3.11  		one_graphic($img."-year.png",$res." yearly");