search with leading @ performs directory search (# for tag search), nothing for text search
This commit is contained in:
parent
c6104fb856
commit
f16a119940
|
@ -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>';
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user