Project

General

Profile

« Previous | Next » 

Revision b406c78a

Added by Ermal LUÇI over 12 years ago

Be explicit on the testing

View differences:

usr/local/www/status_graph.php
72 72
if ($_GET['if']) {
73 73
	$curif = $_GET['if'];
74 74
	$found = false;
75
	foreach($ifdescrs as $descr => $ifdescr) 
76
		if($descr == $curif) $found = true;
77
	if(!$found) {
75
	foreach($ifdescrs as $descr => $ifdescr) {
76
		if ($descr == $curif) {
77
			$found = true;
78
			break;
79
		}
80
	}
81
	if ($found === false) {
78 82
		Header("Location: status_graph.php");
79 83
		exit;
80 84
	}

Also available in: Unified diff