summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorRamón M. Gómez <ramongomez@us.es>2019-08-22 13:43:24 +0200
committerRamón M. Gómez <ramongomez@us.es>2019-08-22 13:43:24 +0200
commit0b97d9697a51f2ddca71b57bd4af57e67f9d0cd4 (patch)
tree0bccb6c52a5e74b1842c263f5355d13ccc07e0b8 /admin
parente3b1b1e2a90629eff6d42d0004a8c1b9ae2f1cda (diff)
#834: Setting a default value for some PHP variables to avoid warnings.
Diffstat (limited to 'admin')
-rw-r--r--admin/WebConsole/includes/restfunctions.php10
-rw-r--r--admin/WebConsole/includes/tftputils.php2
-rw-r--r--admin/WebConsole/principal/aula.php2
-rw-r--r--admin/WebConsole/varios/menucliente.php1
4 files changed, 10 insertions, 5 deletions
diff --git a/admin/WebConsole/includes/restfunctions.php b/admin/WebConsole/includes/restfunctions.php
index 7f710adf..14cace17 100644
--- a/admin/WebConsole/includes/restfunctions.php
+++ b/admin/WebConsole/includes/restfunctions.php
@@ -98,14 +98,18 @@ function clients($case, $ips) {
break;
case 2:
$type = GET;
+ $data = null;
break;
}
$result = common_request(OG_REST_CMD_CLIENTS, $type, $data);
- foreach ($result[OG_REST_PARAM_CLIENTS] as $client) {
- $trama_notificacion = $trama_notificacion.$client[OG_REST_PARAM_ADDR].'/'.
- $client[OG_REST_PARAM_STATE].';';
+ $trama_notificacion = "";
+ if (isset($result[OG_REST_PARAM_CLIENTS])) {
+ foreach ($result[OG_REST_PARAM_CLIENTS] as $client) {
+ $trama_notificacion .= $client[OG_REST_PARAM_ADDR].'/'.
+ $client[OG_REST_PARAM_STATE].';';
+ }
}
return $trama_notificacion;
diff --git a/admin/WebConsole/includes/tftputils.php b/admin/WebConsole/includes/tftputils.php
index 87da6287..aca054a5 100644
--- a/admin/WebConsole/includes/tftputils.php
+++ b/admin/WebConsole/includes/tftputils.php
@@ -98,7 +98,7 @@ function createBootMode ($cmd, $bootopt, $hostname, $lang) {
$description=exec("awk 'NR==1 {print $2}' ".PXEDIRBIOS."/templates/".$bootopt);
if ($description === "") $description=exec("awk 'NR==1 {print $2}' ".PXEDIRUEFI."/templates/".$bootopt);
// Llamamos al script setclientmode
- shell_exec("export LANG=$lang $acceso; /opt/opengnsys/bin/setclientmode $description $hostname PERM $file");
+ shell_exec("export LANG=$lang $acceso; /opt/opengnsys/bin/setclientmode $description $hostname PERM");
}
diff --git a/admin/WebConsole/principal/aula.php b/admin/WebConsole/principal/aula.php
index f687c0b6..f300c508 100644
--- a/admin/WebConsole/principal/aula.php
+++ b/admin/WebConsole/principal/aula.php
@@ -187,7 +187,7 @@ function RecorreAulas($cmd){
while (!$rs->EOF){
$idaula=$rs->campos["idaula"];
$nombreaula=$rs->campos["nombreaula"];
- $idordprofesor=$rs->campos["idordprofesor"];
+ $idordprofesor=(isset($rs->campos["idordprofesor"]) ? $rs->campos["idordprofesor"] : 0);
$cmd->texto="SELECT idordenador,nombreordenador,ip,mac FROM ordenadores WHERE idaula=".$idaula;
$k=0;
$cadenaip="";
diff --git a/admin/WebConsole/varios/menucliente.php b/admin/WebConsole/varios/menucliente.php
index 06cd6816..b1c07c94 100644
--- a/admin/WebConsole/varios/menucliente.php
+++ b/admin/WebConsole/varios/menucliente.php
@@ -45,6 +45,7 @@ else{
$UrlPagina=$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']; // Url página
$UrlPagina=dirname($UrlPagina);
$UrlPaginaIconos=dirname($UrlPagina)."/images/iconos";
+ $codeHtml="";
//________________________________________________________________________________________________________
//agp
$nombre_archivo = "/opt/opengnsys/log/clients/".$iph.".cache.txt";