Project

General

Profile

« Previous | Next » 

Revision a344af88

Added by Phil Davis almost 10 years ago

pptp_local and pptp_remote are arrays

I believe these should reference the [0] array element of pptp_local and pptp_remote. The code in interfaces.php only presents the [0] (first) array element to the user for editing.
The current code also does not preserve any additional pptp_local, pptp_subnet or pptp_remote entries in the coma-separated list in the config. That is redmine bug #4568.
I am currently integrating the fix for Redmine #4568 Preserve MLPPP settings when saving interface settings. The fix for that bug will add more code to preserve additional pptp_local, pptp_subnet or pptp_remote entries.
For now it would be good to have this little fix to the existing code - then the fix for redmine bug #4568 will sit nicely on top of it.

View differences:

src/usr/local/www/interfaces.php
2754 2754
$section->addInput(new Form_IpAddress(
2755 2755
	'pptp_local',
2756 2756
	'Local IP address',
2757
	$pconfig['pptp_local']
2757
	$pconfig['pptp_local'][0]
2758 2758
))->addMask('pptp_subnet', $pconfig['pptp_subnet'][0]);
2759 2759

  
2760 2760
$section->addInput(new Form_IpAddress(
2761 2761
	'pptp_remote',
2762 2762
	'Remote IP address',
2763
	$pconfig['pptp_remote']
2763
	$pconfig['pptp_remote'][0]
2764 2764
));
2765 2765

  
2766 2766
$section->addInput(new Form_Checkbox(

Also available in: Unified diff