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()
return $to_return;
}
function pprint_address($adr) {
if (!isset($specialnets)) {
global $specialnets;
$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) {
$specialnets[$ifgui] = $ifdesc . " net";
$specialnets[$ifgui . 'ip'] = $ifdesc . " address";
}
function get_specialnets()
{
$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) {
$specialnets[$ifgui] = $ifdesc . " net";
$specialnets[$ifgui . 'ip'] = $ifdesc . " address";
}
return $specialnets;
}
function pprint_address($adr) {
$specialnets = get_specialnets();
if (isset($adr['any'])) {
$padr = "*";
} 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