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
|
|
@ -51,13 +51,13 @@ class Activity extends BaseModule
|
|||
$itemId = $this->parameters['id'];
|
||||
|
||||
if (in_array($verb, ['announce', 'unannounce'])) {
|
||||
$item = Post::selectFirst(['network', 'uri-id'], ['id' => $itemId, 'uid' => [local_user(), 0]]);
|
||||
$item = Post::selectFirst(['network', 'uri-id'], ['id' => $itemId, 'uid' => [Session::getLocalUser(), 0]]);
|
||||
if ($item['network'] == Protocol::DIASPORA) {
|
||||
Diaspora::performReshare($item['uri-id'], local_user());
|
||||
Diaspora::performReshare($item['uri-id'], Session::getLocalUser());
|
||||
}
|
||||
}
|
||||
|
||||
if (!Item::performActivity($itemId, $verb, local_user())) {
|
||||
if (!Item::performActivity($itemId, $verb, Session::getLocalUser())) {
|
||||
throw new HTTPException\BadRequestException();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue