diff options
author | Ermal Luçi <eri@pfsense.org> | 2008-09-10 13:18:11 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2008-09-10 13:18:11 +0000 |
commit | 5d41713c0b24cc1088c94175122f8b7ca49fe96c (patch) | |
tree | d304a12f8c56b76795037ff4c2994e777eac7493 /usr/local/www/interfaces_ppp_edit.php | |
parent | 9b1c39e3a3d766c94d59fea75f7bf9e96ca87f85 (diff) | |
download | pfsense-5d41713c0b24cc1088c94175122f8b7ca49fe96c.zip pfsense-5d41713c0b24cc1088c94175122f8b7ca49fe96c.tar.gz |
Catch up with backend modification and synchronize some fields in the GUI itself.
Diffstat (limited to 'usr/local/www/interfaces_ppp_edit.php')
-rw-r--r-- | usr/local/www/interfaces_ppp_edit.php | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/usr/local/www/interfaces_ppp_edit.php b/usr/local/www/interfaces_ppp_edit.php index b7c8e15..b492772 100644 --- a/usr/local/www/interfaces_ppp_edit.php +++ b/usr/local/www/interfaces_ppp_edit.php @@ -52,7 +52,8 @@ if (isset($_POST['id'])) $id = $_POST['id']; if (isset($id) && $a_ppps[$id]) { - $pconfig['if'] = $a_ppps[$id]['if']; + $pconfig['port'] = $a_ppps[$id]['port']; + $pconfig['pppif'] = $a_ppps[$id]['pppif']; $pconfig['initstr'] = $a_ppps[$id]['initstr']; $pconfig['phone'] = $a_ppps[$id]['phone']; $pconfig['linespeed'] = $a_ppps[$id]['linespeed']; @@ -87,18 +88,20 @@ if ($_POST) { $ppp['phone'] = $_POST['phone']; $ppp['linespeed'] = $_POST['linespeed']; $ppp['descr'] = $_POST['descr']; - - if (isset($id) && $a_ppps[$id]) - $a_ppps[$id] = $ppp; - else - $a_ppps[] = $ppp; - - write_config(); - - interfaces_configure(); - - header("Location: interfaces_ppp.php"); - exit; + $ppp['pppif'] = interface_ppp_configure($ppp); + if ($ppp['pppif'] == "" || !stristr($ppp['pppif'], "ppp")) + $input_errors[] = "Error occured creating interface, please retry."; + else { + if (isset($id) && $a_ppps[$id]) + $a_ppps[$id] = $ppp; + else + $a_ppps[] = $ppp; + + write_config(); + + header("Location: interfaces_ppp.php"); + exit; + } } } @@ -125,7 +128,7 @@ include("head.inc"); if(preg_match("/\.(lock|init)$/", $port)) continue; echo "<option value=\"{$port}\""; - if (false) + if ($pconfig['port'] = $port) echo "selected"; echo ">"; echo $port; |