summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
Diffstat (limited to 'usr')
-rw-r--r--usr/local/pkg/miniupnpd.xml15
-rwxr-xr-xusr/local/www/diag_pkglogs.php2
-rw-r--r--usr/local/www/firewall_nat.php1
-rw-r--r--usr/local/www/guiconfig.inc16
-rw-r--r--usr/local/www/pkg_mgr.php11
-rw-r--r--usr/local/www/vpn_openvpn_client.php3
-rw-r--r--usr/local/www/vpn_openvpn_csc.php3
-rw-r--r--usr/local/www/vpn_openvpn_server.php3
8 files changed, 24 insertions, 30 deletions
diff --git a/usr/local/pkg/miniupnpd.xml b/usr/local/pkg/miniupnpd.xml
index e15bbd7..33d8ac4 100644
--- a/usr/local/pkg/miniupnpd.xml
+++ b/usr/local/pkg/miniupnpd.xml
@@ -59,11 +59,8 @@
<fielddescr>External Interface (generally WAN)</fielddescr>
<fieldname>ext_iface</fieldname>
<default_value>wan</default_value>
- <size>3</size>
- <type>select_source</type>
- <source><![CDATA[get_pkg_interfaces_select_source(false)]]></source>
- <source_name>name</source_name>
- <source_value>value</source_value>
+ <type>interfaces_selection</type>
+ <hideinterfaceregex>loopback</hideinterfaceregex>
<description>Select only your primary WAN interface (interface with your default route). Only one interface is allowed here, not multiple.</description>
<required/>
</field>
@@ -71,14 +68,10 @@
<fielddescr>Interfaces (generally LAN)</fielddescr>
<fieldname>iface_array</fieldname>
<default_value>lan</default_value>
- <multiple>true</multiple>
- <size>3</size>
- <type>select_source</type>
- <source><![CDATA[get_pkg_interfaces_select_source(true)]]></source>
- <source_name>name</source_name>
- <source_value>value</source_value>
+ <type>interfaces_selection</type>
<description>You can use the CTRL or COMMAND key to select multiple interfaces.</description>
<required/>
+ <multiple/>
</field>
<field>
<fielddescr>Maximum Download Speed (Kbits/second)</fielddescr>
diff --git a/usr/local/www/diag_pkglogs.php b/usr/local/www/diag_pkglogs.php
index c88bb87..5a64227 100755
--- a/usr/local/www/diag_pkglogs.php
+++ b/usr/local/www/diag_pkglogs.php
@@ -78,7 +78,7 @@ if (!$apkg) { // If we aren't looking for a specific package, locate the first p
}
}
} elseif ($apkg) {
- $apkgid = get_pkg_id($apkg);
+ $apkgid = get_package_id($apkg);
if ($apkgid != -1) {
$pkgwithlogging = true;
$i = $apkgid;
diff --git a/usr/local/www/firewall_nat.php b/usr/local/www/firewall_nat.php
index dcdfa46..adbb948 100644
--- a/usr/local/www/firewall_nat.php
+++ b/usr/local/www/firewall_nat.php
@@ -328,6 +328,7 @@ echo "<script type=\"text/javascript\" src=\"/javascript/domTT/fadomatic.js\"></
<td><a href="firewall_nat_edit.php?dup=<?=$i;?>"><img src="/themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" title="<?=gettext("add a new NAT based on this one");?>" width="17" height="17" border="0" alt="add" /></a></td>
</tr>
</table>
+ </td>
</tr>
<?php $i++; $nnats++; endforeach; ?>
<tr>
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index 804869c..8ad9e92 100644
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -1105,20 +1105,22 @@ function display_top_tabs(& $tab_array, $no_drop_down = false) {
}
}
-function add_package_tabs($tabgroup, & $tab_array) {
+function add_package_tabs($pkgname, &$tab_array) {
global $config, $g;
- if (!is_array($config['installedpackages'])) {
+ $pkg = get_pkg_data($pkgname);
+
+ if (!isset($pkg['configurationfile']) || !file_exists('/usr/local/pkg/' . $pkg['configurationfile'])) {
return;
}
- if (!is_array($config['installedpackages']['tab'])) {
+
+ $pkg_config = parse_xml_config_pkg('/usr/local/pkg/' . $pkg['configurationfile'], "packagegui");
+
+ if (!isset($pkg_config['tabs']['tab'])) {
return;
}
- foreach ($config['installedpackages']['tab'] as $tab) {
- if ($tab['group'] !== $group) {
- continue;
- }
+ foreach($pkg_config['tabs']['tab'] as $tab) {
$tab_entry = array();
if ($tab['name']) {
$tab_entry[] = $tab['name'];
diff --git a/usr/local/www/pkg_mgr.php b/usr/local/www/pkg_mgr.php
index 3552dab..9eab26c 100644
--- a/usr/local/www/pkg_mgr.php
+++ b/usr/local/www/pkg_mgr.php
@@ -83,7 +83,6 @@ if (!file_exists("{$g['tmp_path']}/pkg_info.cache") || (time() - filemtime("{$g[
$fout = fopen("{$g['tmp_path']}/pkg_info.cache", "w");
fwrite($fout, serialize($pkg_info));
fclose($fout);
- //$pkg_sizes = get_pkg_sizes();
} else {
$using_cache = true;
if(file_exists("{$g['tmp_path']}/pkg_info.cache")) {
@@ -150,10 +149,9 @@ include("head.inc");
$categories=array();
if(is_array($pkg_keys)) {
foreach($pkg_keys as $key) {
- if (!package_skip_tests($pkg_info[$key],$requested_version))
- $categories[$pkg_info[$key]['category']]++;
- }
+ $categories[$pkg_info[$key]['category']]++;
}
+ }
ksort($categories);
$cm_count=0;
$tab_array = array();
@@ -204,10 +202,7 @@ include("head.inc");
if(is_array($pkg_keys)) {
foreach($pkg_keys as $key):
$index = &$pkg_info[$key];
- if(get_pkg_id($index['name']) >= 0 )
- continue;
-
- if (package_skip_tests($index,$requested_version))
+ if(get_package_id($index['name']) >= 0 )
continue;
/* get history/changelog git dir */
diff --git a/usr/local/www/vpn_openvpn_client.php b/usr/local/www/vpn_openvpn_client.php
index faf89f9..4ee0278 100644
--- a/usr/local/www/vpn_openvpn_client.php
+++ b/usr/local/www/vpn_openvpn_client.php
@@ -37,6 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
+require_once("pkg-utils.inc");
$pgtitle = array(gettext("OpenVPN"), gettext("Client"));
$shortcut_section = "openvpn";
@@ -446,7 +447,7 @@ if ($savemsg)
$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml");
- add_package_tabs("OpenVPN", $tab_array);
+ add_package_tabs("openvpn-client-export", $tab_array);
display_top_tabs($tab_array);
?>
</td>
diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php
index 5aa6dbd..0241d12 100644
--- a/usr/local/www/vpn_openvpn_csc.php
+++ b/usr/local/www/vpn_openvpn_csc.php
@@ -37,6 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
+require_once("pkg-utils.inc");
$pgtitle = array(gettext("OpenVPN"), gettext("Client Specific Override"));
$shortcut_section = "openvpn";
@@ -317,7 +318,7 @@ function netbios_change() {
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), true, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml");
- add_package_tabs("OpenVPN", $tab_array);
+ add_package_tabs("openvpn-client-export", $tab_array);
display_top_tabs($tab_array);
?>
</td>
diff --git a/usr/local/www/vpn_openvpn_server.php b/usr/local/www/vpn_openvpn_server.php
index b049c81..9ea7f6d 100644
--- a/usr/local/www/vpn_openvpn_server.php
+++ b/usr/local/www/vpn_openvpn_server.php
@@ -37,6 +37,7 @@
require("guiconfig.inc");
require_once("openvpn.inc");
+require_once("pkg-utils.inc");
if (!is_array($config['openvpn']['openvpn-server']))
$config['openvpn']['openvpn-server'] = array();
@@ -744,7 +745,7 @@ if ($savemsg)
$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php");
$tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php");
$tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml");
- add_package_tabs("OpenVPN", $tab_array);
+ add_package_tabs("openvpn-client-export", $tab_array);
display_top_tabs($tab_array);
?>
</td>
OpenPOWER on IntegriCloud