aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2011-11-18 08:31:41 +0100
committerSem <sembrestels@riseup.net>2011-11-18 08:31:41 +0100
commitdea4b5ed2937d874c0782123d2d0958dd0e4b792 (patch)
treeb88f3c45bf2f113e50b998dbc610bdaaab3ab5b7 /engine
parent70374aa8a205751bfde494aae018286caf38773a (diff)
downloadelgg-dea4b5ed2937d874c0782123d2d0958dd0e4b792.tar.gz
elgg-dea4b5ed2937d874c0782123d2d0958dd0e4b792.tar.bz2
Fixed input lib.
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/input.php41
1 files changed, 1 insertions, 40 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php
index b6fead1db..57e35786f 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -289,17 +289,6 @@ 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;
@@ -331,7 +320,6 @@ function input_livesearch_page_handler($page) {
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
@@ -350,16 +338,6 @@ 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;
@@ -384,9 +362,8 @@ function input_livesearch_page_handler($page) {
'icon' => $icon,
'url' => $entity->getURL(),
);
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
- $results[$entity->name . rand(1, 100)] = $json;
+ $results[$entity->name . rand(1, 100)] = $result;
}
}
break;
@@ -408,17 +385,6 @@ 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;
@@ -444,7 +410,6 @@ function input_livesearch_page_handler($page) {
'url' => $entity->getURL(),
);
$results[$entity->name . rand(1, 100)] = $result;
->>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
}
}
break;
@@ -458,12 +423,8 @@ 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;
}