X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fshare.php;h=3e9b6aee6fe86a1046357629642b3ac489d2bbed;hb=6f0d40c6c0957751d5f0de844c81a7a140eb7ec7;hp=229c6d3eb9f2b874937e2fd30a4ce1391b33661f;hpb=0ec44f3e8a73229c3aadea86f61b5571a701c6b7;p=friendica.git diff --git a/mod/share.php b/mod/share.php index 229c6d3eb9..3e9b6aee6f 100644 --- a/mod/share.php +++ b/mod/share.php @@ -1,4 +1,23 @@ . + * + */ use Friendica\App; use Friendica\Database\DBA; @@ -8,15 +27,15 @@ function share_init(App $a) { $post_id = (($a->argc > 1) ? intval($a->argv[1]) : 0); if (!$post_id || !local_user()) { - killme(); + exit(); } $fields = ['private', 'body', 'author-name', 'author-link', 'author-avatar', 'guid', 'created', 'plink', 'title']; $item = Item::selectFirst($fields, ['id' => $post_id]); - if (!DBA::is_result($item) || $item['private'] == 1) { - killme(); + if (!DBA::isResult($item) || $item['private'] == Item::PRIVATE) { + exit(); } if (strpos($item['body'], "[/share]") !== false) { @@ -26,7 +45,7 @@ function share_init(App $a) { $o = share_header($item['author-name'], $item['author-link'], $item['author-avatar'], $item['guid'], $item['created'], $item['plink']); if ($item['title']) { - $o .= '[b]'.$item['title'].'[/b]'."\n"; + $o .= '[h3]'.$item['title'].'[/h3]'."\n"; } $o .= $item['body']; @@ -34,7 +53,7 @@ function share_init(App $a) { } echo $o; - killme(); + exit(); } /// @TODO Rewrite to handle over whole record array