X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=65f8bd2d755fa1f095b9416fdd308a8250c8a699;hb=bbb21a73ad7e39eb6ac658585f1f1b00d6f1e13b;hp=980ec721ab281db90676eab2cb59e03953c3f730;hpb=1b7075aebb344487c40d4444233929029393c82d;p=friendica.git diff --git a/update.php b/update.php index 980ec721ab..65f8bd2d75 100644 --- a/update.php +++ b/update.php @@ -1,6 +1,6 @@ ?", 0, DateTimeFormat::utc('now - ' . DI::config()->get('channel', 'engagement_hours') . ' hour')]); + while ($post = Post::fetch($threads)) { + $post['gravity'] = Item::GRAVITY_COMMENT; + Post\Engagement::storeFromItem($post); + } + DBA::close($threads); + + return Update::SUCCESS; +} + +function update_1535() +{ + if (DI::config()->get('system', 'compute_group_counts')) { + DI::config()->set('system', 'compute_circle_counts', true); + } + DI::config()->delete('system', 'compute_group_counts'); + + return Update::SUCCESS; +} + +function update_1539() +{ + $users = DBA::select('user', ['uid'], ['account-type' => User::ACCOUNT_TYPE_COMMUNITY]); + while ($user = DBA::fetch($users)) { + User::setCommunityUserSettings($user['uid']); + } + DBA::close($users); + + return Update::SUCCESS; +} \ No newline at end of file