diff options
-rw-r--r-- | endpoints/lib/vboxconnector.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/endpoints/lib/vboxconnector.php b/endpoints/lib/vboxconnector.php index 8c0f712..01f8384 100644 --- a/endpoints/lib/vboxconnector.php +++ b/endpoints/lib/vboxconnector.php @@ -1593,7 +1593,7 @@ class vboxconnector { // Network properties $eprops = $n->getProperties(null); $eprops = array_combine($eprops[1],$eprops[0]); - $iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties'])); + $iprops = array_map(function($a){$b=explode("=",$a); return array($b[0]=>$b[1]);},preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties'])); $inprops = array(); foreach($iprops as $a) { foreach($a as $k=>$v) @@ -2113,7 +2113,7 @@ class vboxconnector { // Network properties $eprops = $n->getProperties(null); $eprops = array_combine($eprops[1],$eprops[0]); - $iprops = array_map(create_function('$a','$b=explode("=",$a); return array($b[0]=>$b[1]);'),preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties'])); + $iprops = array_map(function($a){$b=explode("=",$a); return array($b[0]=>$b[1]);},preg_split('/[\r|\n]+/',$args['networkAdapters'][$i]['properties'])); $inprops = array(); foreach($iprops as $a) { foreach($a as $k=>$v) @@ -3944,7 +3944,7 @@ class vboxconnector { else $nd = null; $props = $n->getProperties(null); - $props = implode("\n",array_map(create_function('$a,$b','return "$a=$b";'),$props[1],$props[0])); + $props = implode("\n",array_map(function($a,$b){return "$a=$b";},$props[1],$props[0])); $adapters[] = array( 'adapterType' => (string)$n->adapterType, @@ -4500,7 +4500,7 @@ class vboxconnector { } // sort by port then device - usort($return,create_function('$a,$b', 'if($a["port"] == $b["port"]) { if($a["device"] < $b["device"]) { return -1; } if($a["device"] > $b["device"]) { return 1; } return 0; } if($a["port"] < $b["port"]) { return -1; } return 1;')); + usort($return,function($a,$b){if($a["port"] == $b["port"]) { if($a["device"] < $b["device"]) { return -1; } if($a["device"] > $b["device"]) { return 1; } return 0; } if($a["port"] < $b["port"]) { return -1; } return 1;}); return $return; } |