mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:50:11 +00:00
Several performance improvements
This commit is contained in:
parent
9be09f7df5
commit
5b3145d7ce
15 changed files with 103 additions and 66 deletions
|
@ -48,7 +48,7 @@ class Pin extends BaseModule
|
|||
|
||||
$itemId = intval($this->parameters['id']);
|
||||
|
||||
$item = Post::selectFirst(['uri-id', 'uid', 'featured'], ['id' => $itemId]);
|
||||
$item = Post::selectFirst(['uri-id', 'uid', 'featured', 'author-id'], ['id' => $itemId]);
|
||||
if (!DBA::isResult($item)) {
|
||||
throw new HTTPException\NotFoundException();
|
||||
}
|
||||
|
@ -60,7 +60,7 @@ class Pin extends BaseModule
|
|||
$pinned = !$item['featured'];
|
||||
|
||||
if ($pinned) {
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, local_user());
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, $item['author-id'], local_user());
|
||||
} else {
|
||||
Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, local_user());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue