summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/RecopilaIpesMacs.php19
-rw-r--r--admin/WebConsole/includes/restfunctions.php13
2 files changed, 2 insertions, 30 deletions
diff --git a/admin/WebConsole/includes/RecopilaIpesMacs.php b/admin/WebConsole/includes/RecopilaIpesMacs.php
index 4601a4a2..c41547dc 100644
--- a/admin/WebConsole/includes/RecopilaIpesMacs.php
+++ b/admin/WebConsole/includes/RecopilaIpesMacs.php
@@ -165,22 +165,3 @@ function RecorreOrdenadores($cmd){
}
$rs->Cerrar();
}
-
-function get_netmasks($cmd, &$macs, &$netmasks){
- $macs = str_replace(";", "','", $macs);
- $cmd->texto="SELECT mac, mascara
- FROM ordenadores
- WHERE mac IN ('".$macs."')";
- $rs=new Recordset;
- $rs->Comando=&$cmd;
- if (!$rs->Abrir()) return;
- $macs = "";
- while (!$rs->EOF){
- $macs.=$rs->campos["mac"].";";
- $netmasks.=$rs->campos["mascara"].";";
- $rs->Siguiente();
- }
- $rs->Cerrar();
- $macs = substr($macs, 0, -1);
- $netmasks = substr($netmasks, 0, -1);
-}
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 138c2730..b0ae084e 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -36,7 +36,6 @@ define('OG_REST_CMD_MODE', 'mode');
define('OG_REST_PARAM_CLIENTS', 'clients');
define('OG_REST_PARAM_ADDR', 'addr');
define('OG_REST_PARAM_MAC', 'mac');
-define('OG_REST_PARAM_NETMASK', 'netmask');
define('OG_REST_PARAM_DISK', 'disk');
define('OG_REST_PARAM_PART', 'partition');
define('OG_REST_PARAM_RUN', 'run');
@@ -189,7 +188,7 @@ function clients($case, $ips) {
return $trama_notificacion;
}
-function wol($type_wol, $macs, $ips, $netmasks) {
+function wol($type_wol, $ips) {
switch ($type_wol) {
default:
@@ -200,16 +199,8 @@ function wol($type_wol, $macs, $ips, $netmasks) {
$wol = 'unicast';
}
- $clients = array();
-
- for($i=0; $i<count($macs); $i++) {
- $clients[] = array(OG_REST_PARAM_ADDR => $ips[$i],
- OG_REST_PARAM_MAC => $macs[$i],
- OG_REST_PARAM_NETMASK => $netmasks[$i]);
- }
-
$data = array(OG_REST_PARAM_TYPE => $wol,
- OG_REST_PARAM_CLIENTS => $clients);
+ OG_REST_PARAM_CLIENTS => $ips);
common_request(OG_REST_CMD_WOL, POST, $data);
}