From 12273034f6e0789fc6a15a220b69827d4754baac Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Mon, 20 Apr 2020 10:37:52 +0200 Subject: [PATCH] FEAT #13694 TIME 0:15 Uri instead of ip --- migration/20.10/migrateCustomXml.php | 2 +- src/core/controllers/AuthenticationController.php | 4 ++-- src/core/models/CoreConfigModel.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/migration/20.10/migrateCustomXml.php b/migration/20.10/migrateCustomXml.php index 65ba5e7bc71..1bbdb83bd34 100644 --- a/migration/20.10/migrateCustomXml.php +++ b/migration/20.10/migrateCustomXml.php @@ -27,7 +27,7 @@ if (is_file($file)) { } $jsonFile[] = [ 'id' => (string)$value->custom_id, - 'ip' => $ip, + 'uri' => $ip, 'path' => (string)$value->path ]; } diff --git a/src/core/controllers/AuthenticationController.php b/src/core/controllers/AuthenticationController.php index 7f2074c86a7..43e51383a7f 100755 --- a/src/core/controllers/AuthenticationController.php +++ b/src/core/controllers/AuthenticationController.php @@ -63,8 +63,8 @@ class AuthenticationController if (!empty($jsonFile[0]['path'])) { $coreUrl = UrlController::getCoreUrl(); $url = $coreUrl . $jsonFile[0]['path'] . "/dist/index.html"; - } elseif (!empty($jsonFile[0]['ip'])) { - $url = $jsonFile[0]['ip'] . "/dist/index.html"; + } elseif (!empty($jsonFile[0]['uri'])) { + $url = $jsonFile[0]['uri'] . "/dist/index.html"; } return $response->withJson(['url' => $url]); diff --git a/src/core/models/CoreConfigModel.php b/src/core/models/CoreConfigModel.php index 3ad19ab2824..03dba875c11 100755 --- a/src/core/models/CoreConfigModel.php +++ b/src/core/models/CoreConfigModel.php @@ -46,7 +46,7 @@ class CoreConfigModel if (!empty($value['path']) && $value['path'] == $path) { $customId = $value['id']; return $customId; - } elseif ($value['ip'] == $_SERVER['HTTP_HOST'] || ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR'] && $value['ip'] == $_SERVER['SERVER_ADDR'])) { + } elseif ($value['uri'] == $_SERVER['HTTP_HOST'] || ($_SERVER['HTTP_HOST'] == $_SERVER['SERVER_ADDR'] && $value['uri'] == $_SERVER['SERVER_ADDR'])) { $customId = $value['id']; return $customId; } -- GitLab