Browse Source

handle group results without parsing anything

pull/1/head
Friendika 10 years ago
parent
commit
597d09de1f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      mod/qsearch.php

+ 2
- 2
mod/qsearch.php View File

@ -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));


Loading…
Cancel
Save