]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/PConfig/Repository/PConfig.php
Happy New Year 2023!
[friendica.git] / src / Core / PConfig / Repository / PConfig.php
index d7f1ca3d3e0ac30b2b131c562454c5bfc8ba69c5..5c9d2d51d1f52055ba3b6c04565e9faeaa10f05a 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -21,6 +21,7 @@
 
 namespace Friendica\Core\PConfig\Repository;
 
+use Friendica\App\Mode;
 use Friendica\Core\Config\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();
        }
 
        /**