X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fshare.php;h=2f836c5aa06cc64aed2e9e2eedce9c88c59ecca9;hb=28e2eab7aee3ab5dac11fcc62be595b9a1c2df8b;hp=b606c1a66916fb096c3c0841e67f1b44786c65e6;hpb=d666b6cb42a1b0d46e9fae914a803fbd5e10e2ab;p=friendica.git diff --git a/mod/share.php b/mod/share.php index b606c1a669..2f836c5aa0 100644 --- a/mod/share.php +++ b/mod/share.php @@ -1,6 +1,6 @@ argc > 1) ? intval($a->argv[1]) : 0); + $post_id = ((DI::args()->getArgc() > 1) ? intval(DI::args()->getArgv()[1]) : 0); if (!$post_id || !local_user()) { - exit(); + System::exit(); } $fields = ['private', 'body', 'author-name', 'author-link', 'author-avatar', @@ -37,7 +39,7 @@ function share_init(App $a) { $item = Post::selectFirst($fields, ['id' => $post_id]); if (!DBA::isResult($item) || $item['private'] == Item::PRIVATE) { - exit(); + System::exit(); } if (strpos($item['body'], "[/share]") !== false) { @@ -55,5 +57,5 @@ function share_init(App $a) { } echo $o; - exit(); + System::exit(); }