X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdirfind.php;h=0c6d79480f5fc17ac120451b8c84ef64849885dc;hb=836058c47745f502890a209dfd6efcb3596ace84;hp=801018276644f98adda868676f45fdfdac0e7228;hpb=2206d894b3fec7064b91e0420bcc2b16e9e7009b;p=friendica.git diff --git a/mod/dirfind.php b/mod/dirfind.php index 8010182766..0c6d79480f 100644 --- a/mod/dirfind.php +++ b/mod/dirfind.php @@ -17,17 +17,22 @@ function dirfind_init(&$a) { function dirfind_content(&$a) { $search = notags(trim($_REQUEST['search'])); + + if(strpos($search,'@') === 0) + $search = substr($search,1); $o = ''; - $o .= '

' . t('People Search') . ' - ' . $search . '

'; - + $o .= replace_macros(get_markup_template("section_title.tpl"),array( + '$title' => sprintf( t('People Search - %s'), $search) + )); + if($search) { $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 +51,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