Commit 0e898a63 authored by Ad Schellevis's avatar Ad Schellevis

(guiconfig.inc) split pprint_address

parent 4a0b1b82
...@@ -292,18 +292,19 @@ function get_std_save_message() ...@@ -292,18 +292,19 @@ function get_std_save_message()
return $to_return; return $to_return;
} }
function pprint_address($adr) { function get_specialnets()
if (!isset($specialnets)) { {
global $specialnets; $specialnets = array("(self)" => "This Firewall", "pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients");
$specialnets = array("(self)" => "This Firewall", "pptp" => "PPTP clients", "pppoe" => "PPPoE clients", "l2tp" => "L2TP clients"); $spiflist = get_configured_interface_with_descr(false, true);
foreach ($spiflist as $ifgui => $ifdesc) {
$spiflist = get_configured_interface_with_descr(false, true); $specialnets[$ifgui] = $ifdesc . " net";
foreach ($spiflist as $ifgui => $ifdesc) { $specialnets[$ifgui . 'ip'] = $ifdesc . " address";
$specialnets[$ifgui] = $ifdesc . " net";
$specialnets[$ifgui . 'ip'] = $ifdesc . " address";
}
} }
return $specialnets;
}
function pprint_address($adr) {
$specialnets = get_specialnets();
if (isset($adr['any'])) { if (isset($adr['any'])) {
$padr = "*"; $padr = "*";
} elseif (isset($adr['network'])) { } elseif (isset($adr['network'])) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment