Return results from acl.php in standard form

This commit is contained in:
Stefan Parviainen 2015-01-07 20:45:00 +01:00
parent c9b15bbab5
commit f2e648308c

View file

@ -205,26 +205,6 @@ function acl_init(&$a){
else
$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)) {
foreach($r as $g){