X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=update.php;h=fab51993c16359026206253c9262e3bbb8486ea1;hb=e5c24f33f0c3c51a153a23612fed88be660d0de0;hp=cb9de69fb9072cfc8053fe0d90073ce3c7211f4f;hpb=bc3a6b2bb702a4598a6f4903aea441f5de8ae979;p=friendica.git diff --git a/update.php b/update.php index cb9de69fb9..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); @@ -1112,5 +1112,12 @@ function update_1457() function update_1480() { DBA::update('contact', ['next-update' => DBA::NULL_DATETIME], ['network' => Protocol::FEDERATED]); + 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; }