X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fitem.php;h=430500f99876906ef5d4fe1d48d05f31c3748e44;hb=9be5a7c750e2634a37529945ced226e0cb06c274;hp=703267992d9861435a31dcdb1d8a09ca0da373d0;hpb=4f4d6bace60fa3f43efeb675ba4f1617a9d9df58;p=friendica.git diff --git a/mod/item.php b/mod/item.php index 703267992d..430500f998 100644 --- a/mod/item.php +++ b/mod/item.php @@ -119,13 +119,18 @@ function item_post(&$a) { $tags = get_tags($body); - if($tags) { + if(count($tags)) { foreach($tags as $tag) { + if(strpos($tag,'#') === 0) { + $basetag = substr($tag,1); + $body = str_replace($tag,'#[url=' . $a->get_baseurl() . '/search?search=' . urlencode($basetag) . ']' . $basetag . '[/url]',$body); + continue; + } if(strpos($tag,'@') === 0) { $name = substr($tag,1); - if(strpos($name,'@')) { + if((strpos($name,'@')) || (strpos($name,'http://'))) { $newname = $name; - $links = @webfinger($name); + $links = @lrdd($name); if(count($links)) { foreach($links as $link) { if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') @@ -155,6 +160,7 @@ function item_post(&$a) { } if(count($r)) { $profile = $r[0]['url']; + $newname = $r[0]['name']; if(strlen($inform)) $inform .= ','; $inform .= 'cid:' . $r[0]['id']; @@ -251,6 +257,7 @@ function item_post(&$a) { '$username' => $user['username'], '$email' => $user['email'], '$from' => $from, + '$display' => $a->get_baseurl() . '/display/' . $post_id, '$body' => strip_tags(bbcode($body)) )); @@ -273,6 +280,7 @@ function item_post(&$a) { '$username' => $user['username'], '$email' => $user['email'], '$from' => $from, + '$display' => $a->get_baseurl() . '/display/' . $post_id, '$body' => strip_tags(bbcode($body)) )); @@ -301,9 +309,8 @@ function item_post(&$a) { } $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $proc_debug = get_config('system','proc_debug'); - proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" $proc_debug &", + proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"$notify_type\" \"$post_id\" &", array(),$foo)); goaway($a->get_baseurl() . "/" . $_POST['return'] ); @@ -390,12 +397,10 @@ function item_content(&$a) { } $drop_id = intval($item['id']); $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); - $proc_debug = get_config('system','proc_debug'); - // send the notification upstream/downstream as the case may be - proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" $proc_debug &", + proc_close(proc_open("\"$php_path\" \"include/notifier.php\" \"drop\" \"$drop_id\" &", array(), $foo)); goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);