mirror of
https://github.com/friendica/friendica
synced 2025-04-25 09:50:11 +00:00
old boot.php functions replaced in src/module (2)
This commit is contained in:
parent
b36d4eb0dd
commit
c9f17e1ef5
21 changed files with 102 additions and 88 deletions
|
@ -53,16 +53,16 @@ class Pin extends BaseModule
|
|||
throw new HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
if (!in_array($item['uid'], [0, local_user()])) {
|
||||
if (!in_array($item['uid'], [0, Session::getLocalUser()])) {
|
||||
throw new HttpException\ForbiddenException($l10n->t('Access denied.'));
|
||||
}
|
||||
|
||||
$pinned = !$item['featured'];
|
||||
|
||||
if ($pinned) {
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, $item['author-id'], local_user());
|
||||
Post\Collection::add($item['uri-id'], Post\Collection::FEATURED, $item['author-id'], Session::getLocalUser());
|
||||
} else {
|
||||
Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, local_user());
|
||||
Post\Collection::remove($item['uri-id'], Post\Collection::FEATURED, Session::getLocalUser());
|
||||
}
|
||||
|
||||
// See if we've been passed a return path to redirect to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue