X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=update.php;h=368b70b228bb26a76dcbbea9c0b1841e09873147;hb=b6943aff36f1dfdd284f1d1466300cc48ba992f3;hp=64bd7a9c338dbe9ad77f46e47d1c23193414dc23;hpb=cf38b62993b52a9b9952ae94898d78ed856901e4;p=friendica.git diff --git a/update.php b/update.php index 64bd7a9c33..368b70b228 100644 --- a/update.php +++ b/update.php @@ -41,6 +41,7 @@ */ use Friendica\Core\Logger; +use Friendica\Core\Storage\Capability\ICanReadFromStorage; use Friendica\Core\Update; use Friendica\Core\Worker; use Friendica\Database\Database; @@ -54,8 +55,7 @@ use Friendica\Model\Notification; use Friendica\Model\Photo; use Friendica\Model\Post; use Friendica\Model\Profile; -use Friendica\Model\Storage; -use Friendica\Security\PermissionSet\Depository\PermissionSet; +use Friendica\Security\PermissionSet\Repository\PermissionSet; use Friendica\Worker\Delivery; // Post-update script of PR 5751 @@ -183,7 +183,7 @@ function update_1330() // set the name of the storage instead of the classpath as config if (!empty($currStorage)) { - /** @var Storage\IStorage $currStorage */ + /** @var ICanReadFromStorage $currStorage */ if (!DI::config()->set('storage', 'name', $currStorage::getName())) { return Update::FAILED; } @@ -989,7 +989,7 @@ function update_1434() // in case of an empty config, set "Database" as default storage backend if (empty($name)) { - DI::config()->set('storage', 'name', Storage\Database::getName()); + DI::config()->set('storage', 'name', \Friendica\Core\Storage\Type\Database::getName()); } // In case of a Using deprecated storage class value, set the right name for it @@ -1038,3 +1038,26 @@ function update_1440() return Update::SUCCESS; } + +function update_1441() +{ + $languages = DI::l10n()->getAvailableLanguages(); + + $albums = [Photo::PROFILE_PHOTOS]; + foreach ($languages as $language) { + $albums[] = DI::l10n()->withLang($language)->t(Photo::PROFILE_PHOTOS); + } + $albums = array_unique($albums); + + Photo::update(['photo-type' => Photo::USER_AVATAR], ['album' => $albums]); + + return Update::SUCCESS; +} + +function update_1442() +{ + // transform blocked intros into ignored intros + DBA::update('intro', ['ignore' => 1, 'blocked' => 0], ['blocked' => 1]); + + return Update::SUCCESS; +}