aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-10-01 19:04:08 -0700
committerfriendica <info@friendica.com>2013-10-01 19:04:08 -0700
commit1f965f1b701ab3850e0914e4333ff23b82274109 (patch)
treec6ac0bfb47f1ba52064b12a0c862114ea0776087
parentbacab7a3f0485e9e5c1fe4eee50c7eafad959d7a (diff)
downloadvolse-hubzilla-1f965f1b701ab3850e0914e4333ff23b82274109.tar.gz
volse-hubzilla-1f965f1b701ab3850e0914e4333ff23b82274109.tar.bz2
volse-hubzilla-1f965f1b701ab3850e0914e4333ff23b82274109.zip
search_ac is really whacked - help it out a bit, but much more to do
-rw-r--r--mod/search_ac.php34
1 files changed, 17 insertions, 17 deletions
diff --git a/mod/search_ac.php b/mod/search_ac.php
index 21ff1c9f3..8e87f8449 100644
--- a/mod/search_ac.php
+++ b/mod/search_ac.php
@@ -30,22 +30,22 @@ function search_ac_init(&$a){
$people_sql_extra = protect_sprintf(" AND `name` LIKE '%". dbesc($search) . "%' ");
$tag_sql_extra = protect_sprintf(" AND term LIKE '%". dbesc($search) . "%' ");
}
-
- $r = q("SELECT `id`, `name`, `micro`, `url` FROM `contact`
- WHERE `uid` = %d AND `pending` = 0
- $people_sql_extra
- ORDER BY `name` ASC ",
- intval(local_user())
- );
-
- if(count($r)) {
- foreach($r as $g) {
- $x['photos'][] = $g['micro'];
- $x['links'][] = $g['url'];
- $x['suggestions'][] = '@' . $g['name'];
- $x['data'][] = intval($g['id']);
- }
- }
+// FIXME - this is whacked
+// $r = q("SELECT `id`, `name`, `micro`, `url` FROM `contact`
+// WHERE `uid` = %d AND `pending` = 0
+// $people_sql_extra
+// ORDER BY `name` ASC ",
+// intval(local_user())
+// );
+
+// if($r) {
+// foreach($r as $g) {
+// $x['photos'][] = $g['micro'];
+// $x['links'][] = $g['url'];
+// $x['suggestions'][] = '@' . $g['name'];
+// $x['data'][] = intval($g['id']);
+// }
+// }
// FIXME - extend search to non-connnections if you couldn't find any connections with that name, use poco or directory
// else {
//
@@ -64,7 +64,7 @@ function search_ac_init(&$a){
// }
// }
- $r = q("select tid, term, url from term where type = %d $tag_sql_extra order by term asc",
+ $r = q("select distinct term, tid, url from term where type = %d $tag_sql_extra group by term order by term asc",
intval(TERM_HASHTAG)
);