mirror of
https://github.com/friendica/friendica
synced 2025-04-21 12:30:10 +00:00
Most user-item traces removed
This commit is contained in:
parent
ac03399a90
commit
c1d99d6c4c
13 changed files with 139 additions and 153 deletions
|
@ -96,4 +96,58 @@ class ThreadUser
|
|||
{
|
||||
return DBA::delete('post-thread-user', $conditions, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uri_id
|
||||
* @param int $uid
|
||||
* @return bool
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function getIgnored(int $uri_id, int $uid)
|
||||
{
|
||||
$threaduser = DBA::selectFirst('post-thread-user', ['ignored'], ['uri-id' => $uri_id, 'uid' => $uid]);
|
||||
if (empty($threaduser)) {
|
||||
return false;
|
||||
}
|
||||
return (bool)$threaduser['ignored'];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $uri_id
|
||||
* @param int $uid
|
||||
* @param int $ignored
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*/
|
||||
public static function setIgnored(int $uri_id, int $uid, int $ignored)
|
||||
{
|
||||
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