From 2f004dd4c844c04a3cd74203778dd2434f6bf3e1 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Thu, 2 Apr 2020 22:06:27 +0200 Subject: [PATCH] More Permission Bugfixes lol --- core/Documents/Install.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/Documents/Install.class.php b/core/Documents/Install.class.php index 5308f6c..2d14bf2 100644 --- a/core/Documents/Install.class.php +++ b/core/Documents/Install.class.php @@ -79,7 +79,7 @@ namespace Documents\Install { private function getCurrentStep() { - if(!$this->checkRequirements()) { + if(!$this->checkRequirements()["success"]) { return self::CHECKING_REQUIRMENTS; } @@ -138,7 +138,7 @@ namespace Documents\Install { if (function_exists("posix_getuid")) { $userId = posix_getuid(); - if(fileowner($configDir) !== posix_getuid()) { + if(fileowner($configDir) !== $userId) { $username = posix_getpwuid($userId)['name']; $failedRequirements[] = "$configDir is not owned by current user: $username ($userId). Try running chown -R $username $configDir"; $success = false; @@ -221,7 +221,7 @@ namespace Documents\Install { if(!($sql instanceof \Driver\SQL\SQL)) { $msg = "Error connecting to database: " . str($sql); } else if(!$sql->isConnected()) { - if (!$sql->checkRequirements()) { + if (!$sql->checkRequirements()["success"]) { $driverName = $sql->getDriverName(); $installLink = "https://www.php.net/manual/en/$driverName.setup.php"; $link = $this->createExternalLink($installLink);