From 84a2ff78a3ece8cefdcc90c0e76d0dd81e7c5749 Mon Sep 17 00:00:00 2001 From: Luiz Otavio O Souza Date: Thu, 25 Feb 2016 07:56:18 -0600 Subject: [PATCH] Fixes the PPP interface list. List all physical interfaces + VLANs and not the assigned ports. Ticket #5925 --- src/usr/local/www/interfaces_ppps_edit.php | 25 +++++++++++----------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/usr/local/www/interfaces_ppps_edit.php b/src/usr/local/www/interfaces_ppps_edit.php index e8b08f8d56..eb4c953b6f 100644 --- a/src/usr/local/www/interfaces_ppps_edit.php +++ b/src/usr/local/www/interfaces_ppps_edit.php @@ -79,14 +79,6 @@ if (!is_array($config['ppps']['ppp'])) { $a_ppps = &$config['ppps']['ppp']; -$portlist = get_configured_interface_with_descr(); - -if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { - foreach ($config['vlans']['vlan'] as $vlan) { - $portlist[$vlan['vlanif']] = $vlan; - } -} - if (isset($_REQUEST['type'])) { $pconfig['type'] = $_REQUEST['type']; } @@ -496,11 +488,8 @@ function build_country_list() { return($list); } -$port_count = 0; -$serport_count = 0; - function build_link_list() { - global $pconfig, $portlist, $port_count, $serport_count; + global $config, $pconfig; $linklist = array('list' => array(), 'selected' => array()); @@ -531,6 +520,12 @@ function build_link_list() { } } else { $port_count = 0; + $portlist = get_interface_list(); + if (is_array($config['vlans']['vlan']) && count($config['vlans']['vlan'])) { + foreach ($config['vlans']['vlan'] as $vlan) { + $portlist[$vlan['vlanif']] = $vlan; + } + } foreach ($portlist as $ifn => $ifinfo) { $port_count++; $string = ""; @@ -540,6 +535,12 @@ function build_link_list() { if ($ifinfo['mac']) { $string .= " ({$ifinfo['mac']})"; } + if ($ifinfo['friendly']) { + $string .= " - {$ifinfo['friendly']}"; + } + if ($ifinfo['descr']) { + $string .= " - {$ifinfo['descr']}"; + } } else { $string .= $ifinfo; }