Return results from acl.php in standard form
This commit is contained in:
parent
c9b15bbab5
commit
f2e648308c
20
mod/acl.php
20
mod/acl.php
@ -205,26 +205,6 @@ function acl_init(&$a){
|
|||||||
else
|
else
|
||||||
$r = array();
|
$r = array();
|
||||||
|
|
||||||
|
|
||||||
if($type == 'm' || $type == 'a' || $type == 'p') {
|
|
||||||
$x = array();
|
|
||||||
$x['query'] = $search;
|
|
||||||
$x['photos'] = array();
|
|
||||||
$x['links'] = array();
|
|
||||||
$x['suggestions'] = array();
|
|
||||||
$x['data'] = array();
|
|
||||||
if(count($r)) {
|
|
||||||
foreach($r as $g) {
|
|
||||||
$x['photos'][] = $g['micro'];
|
|
||||||
$x['links'][] = $g['url'];
|
|
||||||
$x['suggestions'][] = $g['name'];
|
|
||||||
$x['data'][] = (($type === 'p') ? '@' . str_replace(' ','_',$g['name']) : $g['id']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
echo json_encode($x);
|
|
||||||
killme();
|
|
||||||
}
|
|
||||||
|
|
||||||
if(count($r)) {
|
if(count($r)) {
|
||||||
foreach($r as $g){
|
foreach($r as $g){
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user