summaryrefslogtreecommitdiffstats
path: root/admin/WebConsole/rest/remotepc.php
diff options
context:
space:
mode:
authorramon <ramongomez@us.es>2017-02-07 13:11:22 +0000
committerramon <ramongomez@us.es>2017-02-07 13:11:22 +0000
commita26527db3d1288c340fc503beca4dbde52d65131 (patch)
tree1ebee7dfc28bbd3143d3e7df0920301e5ca4a87f /admin/WebConsole/rest/remotepc.php
parent6f17d768d08cae1499f1d437b1b95c5299ae6cfa (diff)
#708: Disponible ruta REST {{{/ous/:ouid/labs/:labid/clients/:clntid/events}}}
git-svn-id: https://opengnsys.es/svn/branches/version1.1@5176 a21b9725-9963-47de-94b9-378ad31fedc9
Diffstat (limited to 'admin/WebConsole/rest/remotepc.php')
-rw-r--r--admin/WebConsole/rest/remotepc.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/admin/WebConsole/rest/remotepc.php b/admin/WebConsole/rest/remotepc.php
index adeaa498..3d5c487f 100644
--- a/admin/WebConsole/rest/remotepc.php
+++ b/admin/WebConsole/rest/remotepc.php
@@ -216,14 +216,14 @@ EOD;
$rs->Primero();
if (checkParameter($rs->campos["idordenador"])) {
// Check if client is reserved.
- if ($rs->campos["reserved"] === 1) {
+ if ($rs->campos["reserved"] == 1) {
// Updating DB if client is reserved.
$cmd->texto = <<<EOD
INSERT INTO remotepc
SET id='$clntid', reserved=1, urllogin='$urlLogin', urllogout='$urlLogout'
- ON DUPLICATE UPDATE
+ ON DUPLICATE KEY UPDATE
id=VALUES(id), reserved=VALUES(reserved),
- urllogin=VALUES(urllogin), urllogout=VALUES(urllogout)
+ urllogin=VALUES(urllogin), urllogout=VALUES(urllogout);
EOD;
$cmd->Ejecutar();
// Confirm operation.
@@ -234,11 +234,6 @@ EOD;
jsonResponse(400, $response);
$app->stop();
}
- } else {
- // Error message.
- $response["message"] = "Invalid parameter";
- jsonResponse(400, $response);
- $app->stop();
}
$rs->Cerrar();
}