Project

General

Profile

« Previous | Next » 

Revision 0a48e444

Added by Seth Mos about 18 years ago

Fix botched config path and variables

View differences:

usr/local/www/interfaces.php
134 134
$pconfig['bigpond_minheartbeatinterval'] = $config['bigpond']['minheartbeatinterval'];
135 135

  
136 136
$pconfig['dhcphostname'] = $wancfg['dhcphostname'];
137
$pconfig['rrdgateway'] = $wancfg['rrdgateway'];
137
$pconfig['use_rrd_gateway'] = $wancfg['use_rrd_gateway'];
138 138

  
139 139
if ($wancfg['ipaddr'] == "dhcp") {
140 140
	$pconfig['type'] = "DHCP";
......
256 256
	if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) {
257 257
		$input_errors[] = "The idle timeout value must be an integer.";
258 258
	}
259
	if (($_POST['rrdgateway'] && !is_ipaddr($_POST['rrdgateway']))) {
259
	if (($_POST['use_rrd_gateway'] && !is_ipaddr($_POST['use_rrd_gateway']))) {
260 260
		$input_errors[] = "A valid monitor IP address must be specified.";
261 261
	}
262 262
	if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && 
......
351 351
		}
352 352

  
353 353
		/* per interface rrd gateway monitor helper */
354
		if($_POST['rrdgateway'] <> "") {
355
			$wancfg['rrdgateway'] = $_POST['rrdgateway'];
354
		if($_POST['use_rrd_gateway'] <> "") {
355
			$wancfg['use_rrd_gateway'] = $_POST['use_rrd_gateway'];
356 356
		}
357 357

  
358 358
		if ($_POST['type'] == "Static") {
......
985 985
					<input type="button" onClick="show_mon_config()" value="Advanced"></input> - Show Monitor IP configuration</a>
986 986
				</div>
987 987
				<div id="showmon" style="display:none">
988
					<input name="rrdgateway" type="text" id="rrdgateway" value="<?php echo ($wancfg['rrdgateway']) ; ?>" />
988
					<input name="use_rrd_gateway" type="text" id="use_rrd_gateway" value="<?php echo ($wancfg['use_rrd_gateway']) ; ?>" />
989 989
					<strong>Alternative monitor IP</strong> <br />
990 990
					Enter a alternative address here to be used to monitor the link. This is used for the 
991 991
					quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond 
usr/local/www/interfaces_opt.php
72 72
if ($optcfg['ipaddr'] == "dhcp") {
73 73
	$pconfig['type'] = "DHCP";
74 74
	$pconfig['dhcphostname'] = $optcfg['dhcphostname'];
75
	$pconfig['rrdgateway'] = $optcfg['rrdgateway'];
75
	$pconfig['use_rrd_gateway'] = $optcfg['use_rrd_gateway'];
76 76
} else {
77 77
	$pconfig['type'] = "Static";
78 78
	$pconfig['ipaddr'] = $optcfg['ipaddr'];
......
209 209
		$optcfg['enable'] = $_POST['enable'] ? true : false;
210 210

  
211 211
		/* per interface rrd gateway monitor helper */
212
		if($_POST['rrdgateway'] <> "") {
213
			$wancfg['rrdgateway'] = $_POST['rrdgateway'];
212
		if($_POST['use_rrd_gateway'] <> "") {
213
			$optcfg['use_rrd_gateway'] = $_POST['use_rrd_gateway'];
214 214
		}
215 215

  
216 216
		if ($_POST['type'] == "Static") {
......
417 417
				<input type="button" onClick="show_mon_config()" value="Advanced"></input> - Show Monitor IP configuration
418 418
			</div>
419 419
			<div id="showmon" style="display:none">
420
				<input name="rrdgateway" type="text" id="rrdgateway" value="<?php echo ($wancfg['rrdgateway']) ; ?>" />
420
				<input name="use_rrd_gateway" type="text" id="use_rrd_gateway" value="<?php echo ($optcfg['use_rrd_gateway']) ; ?>" />
421 421
					<strong>Alternative monitor IP</strong> <br />
422 422
					Enter a alternative address here to be used to monitor the link. This is used for the
423 423
					quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond
usr/local/www/interfaces_wan.php
134 134
$pconfig['bigpond_minheartbeatinterval'] = $config['bigpond']['minheartbeatinterval'];
135 135

  
136 136
$pconfig['dhcphostname'] = $wancfg['dhcphostname'];
137
$pconfig['rrdgateway'] = $wancfg['rrdgateway'];
137
$pconfig['use_rrd_gateway'] = $wancfg['use_rrd_gateway'];
138 138

  
139 139
if ($wancfg['ipaddr'] == "dhcp") {
140 140
	$pconfig['type'] = "DHCP";
......
256 256
	if (($_POST['pppoe_idletimeout'] != "") && !is_numericint($_POST['pppoe_idletimeout'])) {
257 257
		$input_errors[] = "The idle timeout value must be an integer.";
258 258
	}
259
	if (($_POST['rrdgateway'] && !is_ipaddr($_POST['rrdgateway']))) {
259
	if (($_POST['use_rrd_gateway'] && !is_ipaddr($_POST['use_rrd_gateway']))) {
260 260
		$input_errors[] = "A valid monitor IP address must be specified.";
261 261
	}
262 262
	if ($_POST['pppoe_resethour'] <> "" && !is_numericint($_POST['pppoe_resethour']) && 
......
351 351
		}
352 352

  
353 353
		/* per interface rrd gateway monitor helper */
354
		if($_POST['rrdgateway'] <> "") {
355
			$wancfg['rrdgateway'] = $_POST['rrdgateway'];
354
		if($_POST['use_rrd_gateway'] <> "") {
355
			$wancfg['use_rrd_gateway'] = $_POST['use_rrd_gateway'];
356 356
		}
357 357

  
358 358
		if ($_POST['type'] == "Static") {
......
985 985
					<input type="button" onClick="show_mon_config()" value="Advanced"></input> - Show Monitor IP configuration</a>
986 986
				</div>
987 987
				<div id="showmon" style="display:none">
988
					<input name="rrdgateway" type="text" id="rrdgateway" value="<?php echo ($wancfg['rrdgateway']) ; ?>" />
988
					<input name="use_rrd_gateway" type="text" id="use_rrd_gateway" value="<?php echo ($wancfg['use_rrd_gateway']) ; ?>" />
989 989
					<strong>Alternative monitor IP</strong> <br />
990 990
					Enter a alternative address here to be used to monitor the link. This is used for the 
991 991
					quality RRD graphs as well as the load balancer entries. Use this if the gateway does not respond 

Also available in: Unified diff