aboutsummaryrefslogtreecommitdiffstats
path: root/mod/search_ac.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/search_ac.php')
-rw-r--r--mod/search_ac.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/mod/search_ac.php b/mod/search_ac.php
index fb3b872da..5bc3c1c0b 100644
--- a/mod/search_ac.php
+++ b/mod/search_ac.php
@@ -46,18 +46,20 @@ function search_ac_init(&$a){
$x['data'][] = intval($g['id']);
}
}
-
- $r = q("SELECT `id`, `name`, `photo`, `url` FROM `gcontact` where 1
- $people_sql_extra
- ORDER BY `name` ASC "
- );
-
- if(count($r)) {
- foreach($r as $g) {
- $x['photos'][] = $g['photo'];
- $x['links'][] = $g['url'];
- $x['suggestions'][] = '@' . $g['name'];
- $x['data'][] = intval($g['id']);
+ else {
+
+ $r = q("SELECT `id`, `name`, `photo`, `url` FROM `gcontact` where 1
+ $people_sql_extra
+ ORDER BY `name` ASC "
+ );
+
+ if(count($r)) {
+ foreach($r as $g) {
+ $x['photos'][] = $g['photo'];
+ $x['links'][] = $g['url'];
+ $x['suggestions'][] = '@' . $g['name'];
+ $x['data'][] = intval($g['id']);
+ }
}
}