]> git.mxchange.org Git - friendica.git/blobdiff - mod/dirfind.php
Merge pull request #1165 from annando/1409-issue-1157
[friendica.git] / mod / dirfind.php
old mode 100755 (executable)
new mode 100644 (file)
index 8010182..5c5d0e9
@@ -17,6 +17,9 @@ function dirfind_init(&$a) {
 function dirfind_content(&$a) {
 
        $search = notags(trim($_REQUEST['search']));
+
+       if(strpos($search,'@') === 0)
+               $search = substr($search,1);
        
        $o = '';
 
@@ -27,7 +30,7 @@ function dirfind_content(&$a) {
                $p = (($a->pager['page'] != 1) ? '&p=' . $a->pager['page'] : '');
                        
                if(strlen(get_config('system','directory_submit_url')))
-                       $x = fetch_url('http://dir.friendika.com/lsearch?f=' . $p .  '&search=' . urlencode($search));
+                       $x = fetch_url('http://dir.friendica.com/lsearch?f=' . $p .  '&search=' . urlencode($search));
 
 //TODO fallback local search if global dir not available.
 //             else
@@ -46,7 +49,7 @@ function dirfind_content(&$a) {
                        foreach($j->results as $jj) {
                                
                                $o .= replace_macros($tpl,array(
-                                       '$url' => $jj->url,
+                                       '$url' => zrl($jj->url),
                                        '$name' => $jj->name,
                                        '$photo' => $jj->photo,
                                        '$tags' => $jj->tags