mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +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
|
@ -50,13 +50,13 @@ class Star extends BaseModule
|
|||
$itemId = intval($this->parameters['id']);
|
||||
|
||||
|
||||
$item = Post::selectFirstForUser(local_user(), ['uid', 'uri-id', 'starred'], ['uid' => [0, local_user()], 'id' => $itemId]);
|
||||
$item = Post::selectFirstForUser(Session::getLocalUser(), ['uid', 'uri-id', 'starred'], ['uid' => [0, Session::getLocalUser()], 'id' => $itemId]);
|
||||
if (empty($item)) {
|
||||
throw new HTTPException\NotFoundException();
|
||||
}
|
||||
|
||||
if ($item['uid'] == 0) {
|
||||
$stored = Item::storeForUserByUriId($item['uri-id'], local_user(), ['post-reason' => Item::PR_ACTIVITY]);
|
||||
$stored = Item::storeForUserByUriId($item['uri-id'], Session::getLocalUser(), ['post-reason' => Item::PR_ACTIVITY]);
|
||||
if (!empty($stored)) {
|
||||
$item = Post::selectFirst(['starred'], ['id' => $stored]);
|
||||
if (!DBA::isResult($item)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue