search with leading @ performs directory search (# for tag search), nothing for text search

This commit is contained in:
friendica 2012-05-19 21:53:27 -07:00
parent c6104fb856
commit f16a119940
2 changed files with 8 additions and 1 deletions

View File

@ -18,6 +18,9 @@ function dirfind_content(&$a) {
$search = notags(trim($_REQUEST['search']));
if(strpos($search,'@') === 0)
$search = substr($search,1);
$o = '';
$o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';

View File

@ -80,7 +80,7 @@ function search_content(&$a) {
$o = '<div id="live-search"></div>' . "\r\n";
$o .= '<h3>' . t('Search This Site') . '</h3>';
$o .= '<h3>' . t('Search') . '</h3>';
if(x($a->data,'search'))
$search = notags(trim($a->data['search']));
@ -101,6 +101,10 @@ function search_content(&$a) {
$tag = true;
$search = substr($search,1);
}
if(strpos($search,'@') === 0) {
require_once('mod/dirfind.php');
return dirfind_content($a);
}
if(! $search)
return $o;