From afa76eff3d145d089e11b93d95a06d27f3249efa Mon Sep 17 00:00:00 2001 From: jim-p Date: Mon, 12 Aug 2013 12:33:46 -0400 Subject: Fix interface selections on UPnP to show the customized descriptions entered by the user. While here, add an external interface selection knob. Fixes #3141 --- etc/inc/pkg-utils.inc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'etc/inc/pkg-utils.inc') diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc index 431d675..bf99a64 100644 --- a/etc/inc/pkg-utils.inc +++ b/etc/inc/pkg-utils.inc @@ -1348,4 +1348,19 @@ function stop_packages() { } } +function get_pkg_interfaces_select_source($include_localhost=false) { + $interfaces = get_configured_interface_with_descr(); + $ssifs = array(); + foreach ($interfaces as $iface => $ifacename) { + $tmp["name"] = $ifacename; + $tmp["value"] = $iface; + $ssifs[] = $tmp; + } + if ($include_localhost) { + $tmp["name"] = "Localhost"; + $tmp["value"] = "lo0"; + $ssifs[] = $tmp; + } + return $ssifs; +} ?> \ No newline at end of file -- cgit v1.1