- if ($distributed_cache_driver_source === \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC &&
- $cache_driver_source > \Friendica\Core\Config\ValueObject\Cache::SOURCE_STATIC) {
- DI::config()->set('system', 'distributed_cache_driver', DI::config()->get('system', 'cache_driver'));
+ if ($distributed_cache_driver_source === Cache::SOURCE_STATIC && $cache_driver_source > Cache::SOURCE_STATIC) {
+ DI::config()->set('system', 'distributed_cache_driver', DI::config()->get('system', 'cache_driver'));
+ }
+
+ return Update::SUCCESS;
+}
+
+function update_1451()
+{
+ DBA::update('user', ['account-type' => User::ACCOUNT_TYPE_COMMUNITY], ['page-flags' => [User::PAGE_FLAGS_COMMUNITY, User::PAGE_FLAGS_PRVGROUP]]);
+ DBA::update('contact', ['contact-type' => Contact::TYPE_COMMUNITY], ["`forum` OR `prv`"]);
+ DBA::update('contact', ['manually-approve' => true], ['prv' => true]);
+
+ return Update::SUCCESS;
+}
+
+function update_1457()
+{
+ $pinned = DBA::select('post-thread-user', ['uri-id', 'author-id'], ['pinned' => true]);
+ while ($post = DBA::fetch($pinned)) {
+ Post\Collection::add($post['uri-id'], Post\Collection::FEATURED, $post['author-id']);