mirror of
https://github.com/friendica/friendica
synced 2024-12-23 00:00:21 +00:00
Force "Database" as default storage backend
This commit is contained in:
parent
d0536ebea7
commit
b798ca2da6
2 changed files with 24 additions and 0 deletions
|
@ -203,4 +203,11 @@ return [
|
||||||
// Used in the admin settings to lock certain features
|
// Used in the admin settings to lock certain features
|
||||||
'featurelock' => [
|
'featurelock' => [
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// Storage backend configuration
|
||||||
|
'storage' => [
|
||||||
|
// name (String)
|
||||||
|
// The name of the current used backend (default is Database)
|
||||||
|
'name' => 'Database',
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
17
update.php
17
update.php
|
@ -981,3 +981,20 @@ function update_1429()
|
||||||
|
|
||||||
return Update::SUCCESS;
|
return Update::SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function update_1433()
|
||||||
|
{
|
||||||
|
$name = DI::config()->get('storage', 'name');
|
||||||
|
|
||||||
|
// in case of an empty config, set "Database" as default storage backend
|
||||||
|
if (empty($name)) {
|
||||||
|
DI::config()->set('storage', 'name', Storage\Database::getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
// In case of a Using deprecated storage class value, set the right name for it
|
||||||
|
if (stristr($name, 'Friendica\Model\Storage\\')) {
|
||||||
|
DI::config()->set('storage', 'name', substr($name, 24));
|
||||||
|
}
|
||||||
|
|
||||||
|
return Update::SUCCESS;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue