X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fshare.php;h=2f836c5aa06cc64aed2e9e2eedce9c88c59ecca9;hb=28e2eab7aee3ab5dac11fcc62be595b9a1c2df8b;hp=a8ac3bd8b57a796b88a6044458849c04d70f2648;hpb=7fd2c0017127100914b36e6c8b0fed2d3dbcfa85;p=friendica.git diff --git a/mod/share.php b/mod/share.php index a8ac3bd8b5..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', 'guid', 'created', 'plink', 'title']; - $item = Item::selectFirst($fields, ['id' => $post_id]); + $item = Post::selectFirst($fields, ['id' => $post_id]); if (!DBA::isResult($item) || $item['private'] == Item::PRIVATE) { - exit(); + System::exit(); } if (strpos($item['body'], "[/share]") !== false) { @@ -54,5 +57,5 @@ function share_init(App $a) { } echo $o; - exit(); + System::exit(); }