Use short form array syntax everywhere
- Add short form array syntax to po2php.php generation
This commit is contained in:
parent
77dfbaa0bf
commit
e36f2bb1fb
212 changed files with 5160 additions and 5160 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue