]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/PConfig/Repository/PConfig.php
Merge pull request #12593 from nupplaphil/feat/node.config.php
[friendica.git] / src / Core / PConfig / Repository / PConfig.php
index 50637135f6c48be0f68e0ac3a79c02e09c32ac8e..506aaeb5a76588d513705149f4c64989516fb3ef 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -21,7 +21,8 @@
 
 namespace Friendica\Core\PConfig\Repository;
 
-use Friendica\Core\Config\Util\ValueConversion;
+use Friendica\App\Mode;
+use Friendica\Core\PConfig\Util\ValueConversion;
 use Friendica\Core\PConfig\Exception\PConfigPersistenceException;
 use Friendica\Database\Database;
 
@@ -34,10 +35,13 @@ class PConfig
 
        /** @var Database */
        protected $db;
+       /** @var Mode */
+       protected $mode;
 
-       public function __construct(Database $db)
+       public function __construct(Database $db, Mode $mode)
        {
-               $this->db = $db;
+               $this->db   = $db;
+               $this->mode = $mode;
        }
 
        /**
@@ -47,7 +51,7 @@ class PConfig
         */
        public function isConnected(): bool
        {
-               return $this->db->isConnected();
+               return $this->db->isConnected() & !$this->mode->isInstall();
        }
 
        /**