From 06d220975c26b86537a9055f897177550919b8fc Mon Sep 17 00:00:00 2001 From: "Jose M. Guisado" Date: Thu, 17 Dec 2020 11:19:50 +0000 Subject: #1015 Fix updateBootMode and use it when updating computer info When a computer info is updated sometimes their related pxe files need to be updated accordingly. In order to recreate the file the function createBootMode was being used inside gestor_ordenadores. Eg: createBootMode ($cmd, $arranque, $ip, $idioma) This had some problems because the POST message to gestor_ordenadores was sometimes lacking the ip field. This field is not necessary because updateBootMode takes the id of the computer and queries the database for the ip of the computer associated with it. Use updateBootMode ($cmd, "idordenador", $idordenador, $idioma) instead. Fixes related mass updater and "moving pc to another classroom" issues. --- admin/WebConsole/includes/tftputils.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin/WebConsole/includes/tftputils.php') diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php index 5c97867c..f35e28d5 100644 --- a/admin/WebConsole/includes/tftputils.php +++ b/admin/WebConsole/includes/tftputils.php @@ -151,7 +151,7 @@ function updateBootMode ($cmd, $idfield, $idvalue, $lang) { $rs->Primero(); while (! $rs->EOF) { $ip = $rs->campos["ip"]; - if (! empty ($hostname)) { + if (! empty ($ip)) { $bootopt=$rs->campos["bootopt"]; // Volver a crear el fichero de arranque. -- cgit v1.2.3-18-g5258