X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2FPost.php;h=93a990a37ed19957ad69879c71ef3c411edb1c96;hb=55db2670d1662b32c6faa820c60c44e16cffab20;hp=c5309b5bd4eb3db5ae61cc1305630404ac4cccf8;hpb=322b7c856ca9ba53bd9c7da50dd5c1e3c9197d56;p=friendica.git diff --git a/src/Model/Post.php b/src/Model/Post.php index c5309b5bd4..93a990a37e 100644 --- a/src/Model/Post.php +++ b/src/Model/Post.php @@ -488,39 +488,6 @@ class Post } } - /** - * Select pinned rows from the post-thread-user table for a given user - * - * @param integer $uid User ID - * @param array $selected Array of selected fields, empty for all - * @param array $condition Array of fields for condition - * @param array $params Array of several parameters - * - * @return boolean|object - * @throws \Exception - */ - public static function selectPinned(int $uid, array $selected = [], array $condition = [], $params = []) - { - $postthreaduser = DBA::select('post-thread-user', ['uri-id'], ['uid' => $uid, 'pinned' => true]); - if (!DBA::isResult($postthreaduser)) { - return $postthreaduser; - } - - $pinned = []; - while ($useritem = DBA::fetch($postthreaduser)) { - $pinned[] = $useritem['uri-id']; - } - DBA::close($postthreaduser); - - if (empty($pinned)) { - return []; - } - - $condition = DBA::mergeConditions(['uri-id' => $pinned, 'uid' => $uid, 'gravity' => GRAVITY_PARENT], $condition); - - return self::selectForUser($uid, $selected, $condition, $params); - } - /** * Update existing post entries *