summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-02-24 12:05:17 -0700
committerErik Fonnesbeck <efonnes@gmail.com>2010-02-24 12:05:17 -0700
commit16120707ea68579bef208d653277be98285a2304 (patch)
tree327140a490752768dcf1864f6404f9bc0fb39e37 /usr
parent38b7d47d71d5955d00a2726619621af3afd8c20a (diff)
downloadpfsense-16120707ea68579bef208d653277be98285a2304.zip
pfsense-16120707ea68579bef208d653277be98285a2304.tar.gz
Change clone_inuse to function in the same style as the other *_inuse functions in the interfaces_*.php files.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/interfaces_wireless.php10
-rw-r--r--usr/local/www/interfaces_wireless_edit.php8
2 files changed, 9 insertions, 9 deletions
diff --git a/usr/local/www/interfaces_wireless.php b/usr/local/www/interfaces_wireless.php
index 9032726..bf455df 100644
--- a/usr/local/www/interfaces_wireless.php
+++ b/usr/local/www/interfaces_wireless.php
@@ -43,14 +43,14 @@ require("guiconfig.inc");
if (!is_array($config['wireless']['clone']))
$config['wireless']['clone'] = array();
-$a_clones = &$config['wireless']['clone'] ;
+$a_clones = &$config['wireless']['clone'];
-function clone_inuse($cloneif) {
- global $config;
+function clone_inuse($num) {
+ global $config, $a_clones;
$iflist = get_configured_interface_list(false, true);
foreach ($iflist as $if) {
- if ($config['interfaces'][$if]['if'] == $cloneif)
+ if ($config['interfaces'][$if]['if'] == $a_clones[$num]['cloneif'])
return true;
}
@@ -59,7 +59,7 @@ function clone_inuse($cloneif) {
if ($_GET['act'] == "del") {
/* check if still in use */
- if (clone_inuse($a_clones[$_GET['id']]['cloneif'])) {
+ if (clone_inuse($_GET['id'])) {
$input_errors[] = "This wireless clone cannot be deleted because it is still being used as an interface.";
} else {
mwexec("/sbin/ifconfig " . $a_clones[$_GET['id']]['cloneif'] . " destroy");
diff --git a/usr/local/www/interfaces_wireless_edit.php b/usr/local/www/interfaces_wireless_edit.php
index 29005ff..34596c2 100644
--- a/usr/local/www/interfaces_wireless_edit.php
+++ b/usr/local/www/interfaces_wireless_edit.php
@@ -45,12 +45,12 @@ if (!is_array($config['wireless']['clone']))
$a_clones = &$config['wireless']['clone'];
-function clone_inuse($cloneif) {
- global $config;
+function clone_inuse($num) {
+ global $config, $a_clones;
$iflist = get_configured_interface_list(false, true);
foreach ($iflist as $if) {
- if ($config['interfaces'][$if]['if'] == $cloneif)
+ if ($config['interfaces'][$if]['if'] == $a_clones[$num]['cloneif'])
return true;
}
@@ -111,7 +111,7 @@ if ($_POST) {
}
if (isset($id) && $a_clones[$id]) {
- if (clone_inuse($a_clones[$id]['if'])) {
+ if (clone_inuse($id)) {
if ($clone['if'] != $a_clones[$id]['if'])
$input_errors[] = "This wireless clone cannot be modified because it is still assigned as an interface.";
else if ($clone['mode'] != $a_clones[$id]['mode'])
OpenPOWER on IntegriCloud