]> git.mxchange.org Git - friendica.git/blobdiff - mod/msearch.php
Fixes:
[friendica.git] / mod / msearch.php
index a652bc8ed87b92d86a646a3043b932b1f79ea65a..0d7cca4ff1b9786f779cecef226b108929924ff6 100644 (file)
@@ -21,7 +21,7 @@ function msearch_post(App $a) {
        if (DBM::is_result($r))
                $total = $r[0]['total'];
 
-       $results = array();
+       $results = [];
 
        $r = q("SELECT `pub_keywords`, `username`, `nickname`, `user`.`uid` FROM `user` LEFT JOIN `profile` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `user`.`hidewall` = 0 AND MATCH `pub_keywords` AGAINST ('%s') LIMIT %d , %d ",
                dbesc($search),
@@ -31,15 +31,15 @@ function msearch_post(App $a) {
 
        if (DBM::is_result($r)) {
                foreach($r as $rr)
-                       $results[] = array(
+                       $results[] = [
                                'name' => $rr['name'],
                                'url' => System::baseUrl() . '/profile/' . $rr['nickname'],
                                'photo' => System::baseUrl() . '/photo/avatar/' . $rr['uid'] . '.jpg',
-                               'tags' => str_replace(array(',','  '),array(' ',' '),$rr['pub_keywords'])
-                       );
+                               'tags' => str_replace([',','  '],[' ',' '],$rr['pub_keywords'])
+                       ];
        }
 
-       $output = array('total' => $total, 'items_page' => $perpage, 'page' => $page + 1, 'results' => $results);
+       $output = ['total' => $total, 'items_page' => $perpage, 'page' => $page + 1, 'results' => $results];
 
        echo json_encode($output);