aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-25 19:56:38 -0800
committerFriendika <info@friendika.com>2011-02-25 19:56:38 -0800
commit597d09de1f1e19e2828c369aaff679e90c9ac7d9 (patch)
treee8cada9f0b63a19cf62756e67b1d509246aef113
parentee4800a4d3eb3c1f11e1dc33a8d6902cf97c2c1f (diff)
downloadvolse-hubzilla-597d09de1f1e19e2828c369aaff679e90c9ac7d9.tar.gz
volse-hubzilla-597d09de1f1e19e2828c369aaff679e90c9ac7d9.tar.bz2
volse-hubzilla-597d09de1f1e19e2828c369aaff679e90c9ac7d9.zip
handle group results without parsing anything
-rw-r--r--mod/qsearch.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/qsearch.php b/mod/qsearch.php
index e61915c75..b55b526ff 100644
--- a/mod/qsearch.php
+++ b/mod/qsearch.php
@@ -26,7 +26,7 @@ function qsearch_init(&$a) {
if(count($r)) {
foreach($r as $rr)
- $results[] = array( t('Group: ') . $rr['name'],'[group]<' . $rr['id'] . '>','');
+ $results[] = array( 0, (int) $rr['id'], $rr['name'], '', '');
}
$sql_extra = ((strlen($search)) ? " AND (`name` REGEXP '$search' OR `nick` REGEXP '$search') " : "");
@@ -41,7 +41,7 @@ function qsearch_init(&$a) {
if(count($r)) {
foreach($r as $rr)
- $results[] = array($rr['name'],$rr['url'],$rr['photo']);
+ $results[] = array( (int) $rr['id'], 0, $rr['name'],$rr['url'],$rr['photo']);
}
echo str_replace('\\/','/',json_encode((object) $results));