<?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
*
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;
/** @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;
}
/**
*/
public function isConnected(): bool
{
- return $this->db->isConnected();
+ return $this->db->isConnected() & !$this->mode->isInstall();
}
/**