summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/includes
diff options
context:
space:
mode:
Diffstat (limited to 'admin/WebConsole/includes')
-rw-r--r--admin/WebConsole/includes/restfunctions.php4
-rw-r--r--admin/WebConsole/includes/tftputils.php10
2 files changed, 7 insertions, 7 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 5c689a70..ec4a323c 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -230,8 +230,8 @@ function session($string_ips, $params) {
common_request(OG_REST_CMD_SESSION, POST, $data);
}
-function set_mode($scope_name, $mode) {
- $data = array(OG_REST_PARAM_SCOPE_NAME => $scope_name,
+function set_mode($ip, $mode) {
+ $data = array(OG_REST_PARAM_CLIENTS => array($ip),
OG_REST_PARAM_MODE => $mode);
common_request(OG_REST_CMD_MODE, POST, $data);
diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php
index d5d857a2..5c97867c 100644
--- a/admin/WebConsole/includes/tftputils.php
+++ b/admin/WebConsole/includes/tftputils.php
@@ -72,7 +72,7 @@ function clientKernelVersion () {
* @author Irina Gómez - ETSII Universidad de Sevilla
* @date 2019-03-14
*/
-function createBootMode ($cmd, $bootopt, $hostname, $lang) {
+function createBootMode ($cmd, $bootopt, $ip, $lang) {
global $cadenaconexion;
// Datos para el acceso a mysql
@@ -98,7 +98,7 @@ function createBootMode ($cmd, $bootopt, $hostname, $lang) {
// Descripción plantilla PXE
$description=exec("awk 'NR==1 {print $2}' ".PXEDIRBIOS."/templates/".$bootopt);
if ($description === "") $description=exec("awk 'NR==1 {print $2}' ".PXEDIRUEFI."/templates/".$bootopt);
- set_mode($hostname, $bootopt);
+ set_mode($ip, $bootopt);
}
@@ -142,7 +142,7 @@ function updateBootMode ($cmd, $idfield, $idvalue, $lang) {
$idvalue = mysqli_real_escape_string ($cmd->Conexion->controlador, $idvalue);
// Obtener los ordenadores asociados al aula y sus plantillas de arranque.
- $cmd->texto = "SELECT nombreordenador AS hostname, arranque AS bootopt
+ $cmd->texto = "SELECT ip, arranque AS bootopt
FROM ordenadores
WHERE $idfield=$idvalue";
$rs = new Recordset;
@@ -150,12 +150,12 @@ function updateBootMode ($cmd, $idfield, $idvalue, $lang) {
if ($rs->Abrir()) {
$rs->Primero();
while (! $rs->EOF) {
- $hostname=$rs->campos["hostname"];
+ $ip = $rs->campos["ip"];
if (! empty ($hostname)) {
$bootopt=$rs->campos["bootopt"];
// Volver a crear el fichero de arranque.
- createBootMode ($cmd, $bootopt, $hostname, $lang);
+ createBootMode ($cmd, $bootopt, $ip, $lang);
}
$rs->Siguiente();
}