X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fshare.php;h=761220ad7fca94509f6a4d7cf3619d8eaacff821;hb=31064a15eca8c70ff154e91116bb5928c99f7143;hp=f6c025e3cef29ea774c58bae14d341c94a18ec78;hpb=dadf80f64479792be85c7026fe1e3c5440066211;p=friendica.git diff --git a/mod/share.php b/mod/share.php old mode 100755 new mode 100644 index f6c025e3ce..761220ad7f --- a/mod/share.php +++ b/mod/share.php @@ -8,26 +8,25 @@ function share_init(&$a) { if((! $post_id) || (! local_user())) killme(); - $r = q("SELECT * FROM `item` WHERE `id` = %d LIMIT 1", - intval($post_id) + $r = q("SELECT item.*, contact.network FROM `item` + left join contact on `item`.`contact-id` = `contact`.`id` + WHERE `item`.`id` = %d AND `item`.`uid` = %d LIMIT 1", + + intval($post_id), + intval(local_user()) ); - if(! count($r) || $r[0]['private']) + if(! count($r) || ($r[0]['private'] == 1)) killme(); $o = ''; - if(local_user() && intval(get_pconfig(local_user(),'system','plaintext'))) { - $o .= '♲ [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]'; - if($r[0]['title']) - $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n"; - $o .= $r[0]['body'] . "\n"; - } - else { - $o .= '♲ ' . $r[0]['author-name'] . '
'; - if($r[0]['title']) - $o .= '' . $r[0]['title'] . '
'; - $o .= bbcode($r[0]['body'], true) . '
'; - } + $o .= "\xE2\x99\xb2" . ' [url=' . $r[0]['author-link'] . ']' . $r[0]['author-name'] . '[/url]' . "\n"; + if($r[0]['title']) + $o .= '[b]' . $r[0]['title'] . '[/b]' . "\n"; + $o .= $r[0]['body'] . "\n" ; + + $o .= (($r[0]['plink']) ? '[url=' . $r[0]['plink'] . ']' . t('link') . '[/url]' . "\n" : ''); + echo $o; killme(); }