if ($entities = get_data($query)) {
foreach ($entities as $entity) {
-<<<<<<< HEAD
- $json = json_encode(array(
- 'type' => 'user',
- 'name' => $entity->name,
- 'desc' => $entity->username,
- 'icon' => '<img class="livesearch_icon" src="' .
- get_entity($entity->guid)->getIconURL('tiny') . '" />',
- 'guid' => $entity->guid
- ));
- $results[$entity->name . rand(1, 100)] = $json;
-=======
$entity = get_entity($entity->guid);
if (!$entity) {
continue;
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
";
if ($entities = get_data($query)) {
foreach ($entities as $entity) {
-<<<<<<< HEAD
- $json = json_encode(array(
- 'type' => 'group',
- 'name' => $entity->name,
- 'desc' => strip_tags($entity->description),
- 'icon' => '<img class="livesearch_icon" src="'
- . get_entity($entity->guid)->getIcon('tiny') . '" />',
- 'guid' => $entity->guid
- ));
-=======
$entity = get_entity($entity->guid);
if (!$entity) {
continue;
'icon' => $icon,
'url' => $entity->getURL(),
);
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
- $results[$entity->name . rand(1, 100)] = $json;
+ $results[$entity->name . rand(1, 100)] = $result;
}
}
break;
if ($entities = get_data($query)) {
foreach ($entities as $entity) {
-<<<<<<< HEAD
- $json = json_encode(array(
- 'type' => 'user',
- 'name' => $entity->name,
- 'desc' => $entity->username,
- 'icon' => '<img class="livesearch_icon" src="'
- . get_entity($entity->guid)->getIcon('tiny') . '" />',
- 'guid' => $entity->guid
- ));
- $results[$entity->name . rand(1, 100)] = $json;
-=======
$entity = get_entity($entity->guid);
if (!$entity) {
continue;
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
}
ksort($results);
-<<<<<<< HEAD
- echo implode($results, "\n");
-=======
header("Content-Type: application/json");
echo json_encode(array_values($results));
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
exit;
}