public static function init()
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return;
+ }
+
if (self::getApp()->getConfigValue('system', 'config_adapter') == 'preload') {
self::$adapter = new Config\PreloadConfigAdapter();
} else {
*/
public static function load($family = "config")
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return;
+ }
+
if (empty(self::$adapter)) {
self::init();
}
*/
public static function get($family, $key, $default_value = null, $refresh = false)
{
+ // Database isn't ready or populated yet, fallback to file config
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return self::getApp()->getConfigValue($family, $key, $default_value);
+ }
+
if (empty(self::$adapter)) {
self::init();
}
*/
public static function set($family, $key, $value)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return false;
+ }
+
if (empty(self::$adapter)) {
self::init();
}
*/
public static function delete($family, $key)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return false;
+ }
+
if (empty(self::$adapter)) {
self::init();
}
namespace Friendica\Core;
use Friendica\BaseObject;
-use Friendica\Core\Config;
require_once 'include/dba.php';
public static function init($uid)
{
- if (Config::get('system', 'config_adapter') == 'preload') {
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return;
+ }
+
+ if (self::getApp()->getConfigValue('system', 'config_adapter') == 'preload') {
self::$adapter = new Config\PreloadPConfigAdapter($uid);
} else {
self::$adapter = new Config\JITPConfigAdapter($uid);
*/
public static function load($uid, $family)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return;
+ }
+
if (empty(self::$adapter)) {
self::init($uid);
}
*/
public static function get($uid, $family, $key, $default_value = null, $refresh = false)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return;
+ }
+
if (empty(self::$adapter)) {
self::init($uid);
}
*/
public static function set($uid, $family, $key, $value)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return false;
+ }
+
if (empty(self::$adapter)) {
self::init($uid);
}
*/
public static function delete($uid, $family, $key)
{
+ // Database isn't ready or populated yet
+ if (self::getApp()->mode === \Friendica\App::MODE_INSTALL) {
+ return false;
+ }
+
if (empty(self::$adapter)) {
self::init($uid);
}