From 7c6e9b3643ba65dfaba73d46a232ff84a9f281e6 Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 7 Jun 2024 12:10:36 +0200 Subject: [PATCH] bugfix, changed sql-patch naming scheme --- ...08-EntityLog.php => 2021-04-08_EntityLog.php} | 0 ...tings-GPG.php => 2024-05-11_Settings-GPG.php} | 0 Core/Driver/SQL/MySQL.class.php | 1 - Core/Elements/View.class.php | 2 +- .../DatabaseEntity/Attribute/Many.class.php | 16 ---------------- Site/Elements/.gitkeep | 0 index.php | 5 ++++- 7 files changed, 5 insertions(+), 19 deletions(-) rename Core/Configuration/Patch/{2021_04_08-EntityLog.php => 2021-04-08_EntityLog.php} (100%) rename Core/Configuration/Patch/{2024_05_11-Settings-GPG.php => 2024-05-11_Settings-GPG.php} (100%) delete mode 100644 Core/Objects/DatabaseEntity/Attribute/Many.class.php create mode 100644 Site/Elements/.gitkeep diff --git a/Core/Configuration/Patch/2021_04_08-EntityLog.php b/Core/Configuration/Patch/2021-04-08_EntityLog.php similarity index 100% rename from Core/Configuration/Patch/2021_04_08-EntityLog.php rename to Core/Configuration/Patch/2021-04-08_EntityLog.php diff --git a/Core/Configuration/Patch/2024_05_11-Settings-GPG.php b/Core/Configuration/Patch/2024-05-11_Settings-GPG.php similarity index 100% rename from Core/Configuration/Patch/2024_05_11-Settings-GPG.php rename to Core/Configuration/Patch/2024-05-11_Settings-GPG.php diff --git a/Core/Driver/SQL/MySQL.class.php b/Core/Driver/SQL/MySQL.class.php index 0300a6b..de46b27 100644 --- a/Core/Driver/SQL/MySQL.class.php +++ b/Core/Driver/SQL/MySQL.class.php @@ -475,7 +475,6 @@ class MySQL extends SQL { return $query; } - // FIXME: access mysql database instead of configured one public function tableExists(string $tableName): bool { $tableSchema = $this->connectionData->getProperty("database"); $res = $this->select(new Count()) diff --git a/Core/Elements/View.class.php b/Core/Elements/View.class.php index b6edb98..6001627 100644 --- a/Core/Elements/View.class.php +++ b/Core/Elements/View.class.php @@ -14,7 +14,7 @@ abstract class View extends StaticView { public function __construct(Document $document, bool $loadView = true) { $this->document = $document; $this->title = "Untitled View"; - $this->langModules = array(); + $this->langModules = []; $this->loadView = $loadView; } diff --git a/Core/Objects/DatabaseEntity/Attribute/Many.class.php b/Core/Objects/DatabaseEntity/Attribute/Many.class.php deleted file mode 100644 index aa66da4..0000000 --- a/Core/Objects/DatabaseEntity/Attribute/Many.class.php +++ /dev/null @@ -1,16 +0,0 @@ -type = $type; - } - - public function getValue(): string { - return $this->type; - } -} \ No newline at end of file diff --git a/Site/Elements/.gitkeep b/Site/Elements/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/index.php b/index.php index d26daed..91e212b 100644 --- a/index.php +++ b/index.php @@ -30,7 +30,10 @@ $context->parseCookies(); $currentHostName = getCurrentHostName(); $installation = !$sql || ($sql->isConnected() && !$settings->isInstalled()); -$requestedUri = $_GET["site"] ?? $_GET["api"] ?? $_SERVER["REQUEST_URI"]; +$requestedUri = $_GET["site"] ?? $_GET["api"] ?? null; +if (!is_string($requestedUri)) { + $requestedUri = $_SERVER["REQUEST_URI"]; +} if ($installation) { $requestedUri = Router::cleanURL($requestedUri);