Project

General

Profile

« Previous | Next » 

Revision 14cf741d

Added by Scott Ullrich over 19 years ago

MFC 10431
updated leases are appended to the end of the lease file. if we aren't showing everything just show the most current lease in the list.

View differences:

usr/local/www/diag_dhcp_leases.php
163 163
					break;
164 164
			}
165 165
		}
166
	} else if (($data[0] == "}") && ($data[1] == 1))		// End of group
166
	} else if (($data[0] == "}") && ($data[1] == 1)) {		// End of group
167

  
168
		//updated leases are appended to the end of the lease file. if we aren't
169
		//showing everything just show the most current lease in the list
170
		if(!$_GET['all']) {
171
			$l = $leases[$i]['ip'];
172
			for($k = 0; $k < $i; $k++) {
173
				if($leases[$k]['ip'] == $l) {
174
					array_splice($leases, $k, 1);
175
					--$i;
176
					break;
177
				}
178
			}
179
		}
167 180
		$i++;
181
	}
168 182
}
169 183
foreach($config['interfaces'] as $ifname => $ifarr) {
170 184
	if (is_array($config['dhcpd'][$ifname]['staticmap'])) {

Also available in: Unified diff