X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=fab51993c16359026206253c9262e3bbb8486ea1;hb=ec1da900943d1b3013a40b0781a66c6ec9c99452;hp=a28187e0cf6e42e3ff2cdffa53d598b385ea16d4;hpb=21f3a56c424a85fbfea023e577e24420d960cdb3;p=friendica.git diff --git a/update.php b/update.php index a28187e0cf..fab51993c1 100644 --- a/update.php +++ b/update.php @@ -1100,9 +1100,9 @@ function update_1451() function update_1457() { - $pinned = DBA::select('post-thread-user', ['uri-id'], ['pinned' => true]); + $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\Collection::add($post['uri-id'], Post\Collection::FEATURED, $post['author-id']); } DBA::close($pinned); @@ -1115,3 +1115,9 @@ function update_1480() DBA::update('post', ['deleted' => false], ["`uri-id` IN (SELECT `uri-id` FROM `post-user` WHERE NOT `deleted`)"]); return Update::SUCCESS; } + +function update_1481() +{ + DBA::e("UPDATE `post-collection` INNER JOIN `post` ON `post`.`uri-id` = `post-collection`.`uri-id` SET `post-collection`.`author-id` = `post`.`author-id` WHERE `post-collection`.`author-id` IS null"); + return Update::SUCCESS; +}