mirror of
https://github.com/friendica/friendica
synced 2024-12-23 09:20:17 +00:00
search with leading @ performs directory search (# for tag search), nothing for text search
This commit is contained in:
parent
c6104fb856
commit
f16a119940
2 changed files with 8 additions and 1 deletions
|
@ -18,6 +18,9 @@ function dirfind_content(&$a) {
|
||||||
|
|
||||||
$search = notags(trim($_REQUEST['search']));
|
$search = notags(trim($_REQUEST['search']));
|
||||||
|
|
||||||
|
if(strpos($search,'@') === 0)
|
||||||
|
$search = substr($search,1);
|
||||||
|
|
||||||
$o = '';
|
$o = '';
|
||||||
|
|
||||||
$o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';
|
$o .= '<h2>' . t('People Search') . ' - ' . $search . '</h2>';
|
||||||
|
|
|
@ -80,7 +80,7 @@ function search_content(&$a) {
|
||||||
|
|
||||||
$o = '<div id="live-search"></div>' . "\r\n";
|
$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'))
|
if(x($a->data,'search'))
|
||||||
$search = notags(trim($a->data['search']));
|
$search = notags(trim($a->data['search']));
|
||||||
|
@ -101,6 +101,10 @@ function search_content(&$a) {
|
||||||
$tag = true;
|
$tag = true;
|
||||||
$search = substr($search,1);
|
$search = substr($search,1);
|
||||||
}
|
}
|
||||||
|
if(strpos($search,'@') === 0) {
|
||||||
|
require_once('mod/dirfind.php');
|
||||||
|
return dirfind_content($a);
|
||||||
|
}
|
||||||
|
|
||||||
if(! $search)
|
if(! $search)
|
||||||
return $o;
|
return $o;
|
||||||
|
|
Loading…
Reference in a new issue