X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fqsearch.php;h=c35e253b670508c23771013c04187ca482f36a44;hb=c4e6cb916db2162075618c7c4be674b4b61c5b35;hp=e61915c758f928e50a650ce8ac55ed04cc0e2cab;hpb=ee4800a4d3eb3c1f11e1dc33a8d6902cf97c2c1f;p=friendica.git diff --git a/mod/qsearch.php b/mod/qsearch.php index e61915c758..c35e253b67 100644 --- a/mod/qsearch.php +++ b/mod/qsearch.php @@ -5,7 +5,7 @@ function qsearch_init(&$a) { if(! local_user()) killme(); - $limit = (get_config('system','lsearch_limit') ? intval(get_config('system','lsearch_limit')) : 100); + $limit = (get_config('system','qsearch_limit') ? intval(get_config('system','qsearch_limit')) : 100); $search = ((x($_GET,'s')) ? notags(trim(urldecode($_GET['s']))) : ''); @@ -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,9 +41,10 @@ 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)); + echo json_encode((object) $results); killme(); -} \ No newline at end of file +} +