aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/input.php41
1 files changed, 40 insertions, 1 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index 57e35786f..b6fead1db 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -289,6 +289,17 @@ function input_livesearch_page_handler($page) {
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;
@@ -320,6 +331,7 @@ function input_livesearch_page_handler($page) {
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
+>>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
@@ -338,6 +350,16 @@ function input_livesearch_page_handler($page) {
";
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;
@@ -362,8 +384,9 @@ function input_livesearch_page_handler($page) {
'icon' => $icon,
'url' => $entity->getURL(),
);
+>>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
- $results[$entity->name . rand(1, 100)] = $result;
+ $results[$entity->name . rand(1, 100)] = $json;
}
}
break;
@@ -385,6 +408,17 @@ function input_livesearch_page_handler($page) {
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;
@@ -410,6 +444,7 @@ function input_livesearch_page_handler($page) {
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
+>>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
@@ -423,8 +458,12 @@ function input_livesearch_page_handler($page) {
}
ksort($results);
+<<<<<<< HEAD
+ echo implode($results, "\n");
+=======
header("Content-Type: application/json");
echo json_encode(array_values($results));
+>>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
exit;
}