]> git.mxchange.org Git - friendica.git/blobdiff - update.php
Merge pull request #11959 from annando/notice
[friendica.git] / update.php
index a28187e0cf6e42e3ff2cdffa53d598b385ea16d4..fab51993c16359026206253c9262e3bbb8486ea1 100644 (file)
@@ -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;
+}