Commit c12bd9a3 authored by Franco Fichtner's avatar Franco Fichtner

interfaces: get_interface_arr() should return an array

but changing the default likely breaks something else so
fix it here...
parent f657ecb1
...@@ -112,21 +112,24 @@ function get_interface_arr($flush = false) ...@@ -112,21 +112,24 @@ function get_interface_arr($flush = false)
return $interface_arr_cache; return $interface_arr_cache;
} }
/* function does_interface_exist($interface, $flush = true)
* does_interface_exist($interface): return true or false if a interface is {
* detected.
*/
function does_interface_exist($interface, $flush = true) {
global $config; global $config;
if(!$interface) if(!$interface) {
return false; return false;
}
$ints = get_interface_arr($flush); $ints = get_interface_arr($flush);
if (in_array($interface, $ints)) if ($ints == null) {
return true;
else
return false; return false;
}
if (!in_array($interface, $ints)) {
return false;
}
return true;
} }
......
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