]> git.mxchange.org Git - friendica.git/commitdiff
search with leading @ performs directory search (# for tag search), nothing for text...
authorfriendica <info@friendica.com>
Sun, 20 May 2012 04:53:27 +0000 (21:53 -0700)
committerfriendica <info@friendica.com>
Sun, 20 May 2012 04:53:27 +0000 (21:53 -0700)
mod/dirfind.php
mod/search.php

index 34c54dd9185877b23fbf5a00b55cc7860c22bc84..5c5d0e933ac5856444811e4479409f4cdcbbd93e 100644 (file)
@@ -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 = '';
 
index 635c87b705cb0084c0fb9aca834e69ca13e0c3a5..3e6bf68aa679c96c1aaaa3507e3c00cc261e3ae3 100644 (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;