mirror of
https://github.com/friendica/friendica
synced 2025-04-22 05:50:13 +00:00
Display featured posts for contacts
This commit is contained in:
parent
8669f12176
commit
75bc4eccb7
21 changed files with 172 additions and 118 deletions
|
@ -123,31 +123,4 @@ class ThreadUser
|
|||
{
|
||||
DBA::update('post-thread-user', ['ignored' => $ignored], ['uri-id' => $uri_id, 'uid' => $uid], true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uri_id
|
||||
* @param int $uid
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getPinned(int $uri_id, int $uid)
|
||||
{
|
||||
$threaduser = DBA::selectFirst('post-thread-user', ['pinned'], ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||
if (empty($threaduser)) {
|
||||
return false;
|
||||
}
|
||||
return (bool)$threaduser['pinned'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uri_id
|
||||
* @param int $uid
|
||||
* @param int $pinned
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function setPinned(int $uri_id, int $uid, int $pinned)
|
||||
{
|
||||
DBA::update('post-thread-user', ['pinned' => $pinned], ['uri-id' => $uri_id, 'uid' => $uid], true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue