mirror of
https://github.com/friendica/friendica
synced 2025-04-25 17:10:11 +00:00
Move System::httpError to BaseModule->httpError
- This will ensure headers set in BaseModule->run will be carried in httpError scenarios - Deprecate httpError() method in Core\System
This commit is contained in:
parent
da1416c07f
commit
e424b7bacb
5 changed files with 35 additions and 11 deletions
|
@ -57,12 +57,12 @@ class Share extends \Friendica\BaseModule
|
|||
{
|
||||
$post_id = $this->parameters['post_id'];
|
||||
if (!$post_id || !$this->session->getLocalUserId()) {
|
||||
System::httpError(403);
|
||||
$this->httpError(403);
|
||||
}
|
||||
|
||||
$item = Post::selectFirst(['private', 'body', 'uri', 'plink', 'network'], ['id' => $post_id]);
|
||||
if (!$item || $item['private'] == Item::PRIVATE) {
|
||||
System::httpError(404);
|
||||
$this->httpError(404);
|
||||
}
|
||||
|
||||
$shared = $this->contentItem->getSharedPost($item, ['uri']);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue