diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-08-16 10:32:35 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-08-16 10:32:35 +0200 |
commit | 4a7384bc0ce1893a432bf4b7d67bca23796fe9db (patch) | |
tree | 5623c66a3f66445284529d6207e4ab4a2edb2810 /Zotlabs/Module/Search.php | |
parent | c664a4bdcd1bd578f5ec3c2884f7c97e9f68d2d7 (diff) | |
parent | 90bc21f2d560d879d7eaf05a85af6d6dca53ebac (diff) | |
download | volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.gz volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.bz2 volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.zip |
Merge branch '2.6RC'2.6
Diffstat (limited to 'Zotlabs/Module/Search.php')
-rw-r--r-- | Zotlabs/Module/Search.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php index aacdc88e7..e1d35b879 100644 --- a/Zotlabs/Module/Search.php +++ b/Zotlabs/Module/Search.php @@ -15,14 +15,14 @@ class Search extends \Zotlabs\Web\Controller { if((get_config('system','block_public')) || (get_config('system','block_public_search'))) { if ((! local_channel()) && (! remote_channel())) { notice( t('Public access denied.') . EOL); - return; + return; } } if($load) $_SESSION['loadtime'] = datetime_convert(); - nav_set_selected('search'); + nav_set_selected(t('Search')); require_once("include/bbcode.php"); require_once('include/security.php'); @@ -81,11 +81,12 @@ class Search extends \Zotlabs\Web\Controller { return $o; if($tag) { - $sql_extra = sprintf(" AND item.id IN (select oid from term where otype = %d and ttype in ( %d , %d) and term = '%s') ", + $wildtag = str_replace('*','%',$search); + $sql_extra = sprintf(" AND item.id IN (select oid from term where otype = %d and ttype in ( %d , %d) and term like '%s') ", intval(TERM_OBJ_POST), intval(TERM_HASHTAG), intval(TERM_COMMUNITYTAG), - dbesc(protect_sprintf($search)) + dbesc(protect_sprintf($wildtag)) ); } else { @@ -144,7 +145,7 @@ class Search extends \Zotlabs\Web\Controller { } - $item_normal = item_normal(); + $item_normal = item_normal_search(); $pub_sql = public_permissions_sql($observer_hash); require_once('include/channel.php'); @@ -225,7 +226,7 @@ class Search extends \Zotlabs\Web\Controller { else $o .= '<h2>' . sprintf( t('Search results for: %s'),htmlspecialchars($search, ENT_COMPAT,'UTF-8')) . '</h2>'; - $o .= conversation($a,$items,'search',$update,'client'); + $o .= conversation($items,'search',$update,'client'); $o .= '</div>'; |