]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Merge github.com:Elgg/Elgg
authorSem <sembrestels@riseup.net>
Fri, 18 Nov 2011 06:32:27 +0000 (07:32 +0100)
committerSem <sembrestels@riseup.net>
Fri, 18 Nov 2011 06:32:27 +0000 (07:32 +0100)
Conflicts:
engine/lib/input.php

1  2 
engine/lib/input.php

index 56ec214dc6ff0dac97de6025a47dbbd4008935f6,57e35786f9647c257d42fda6202a228f5eb27461..b6fead1db95d2170987713150721e53389524d2d
@@@ -294,15 -289,37 +289,49 @@@ function input_livesearch_page_handler(
  
                                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;
+                                               }
+                                               if (in_array('groups', $match_on)) {
+                                                       $value = $entity->guid;
+                                               } else {
+                                                       $value = $entity->username;
+                                               }
+                                               $output = elgg_view_list_item($entity, array(
+                                                       'use_hover' => false,
+                                                       'class' => 'elgg-autocomplete-item',
+                                               ));
+                                               $icon = elgg_view_entity_icon($entity, 'tiny', array(
+                                                       'use_hover' => false,
+                                               ));
+                                               $result = array(
+                                                       'type' => 'user',
+                                                       'name' => $entity->name,
+                                                       'desc' => $entity->username,
+                                                       'guid' => $entity->guid,
+                                                       'label' => $output,
+                                                       'value' => $value,
+                                                       'icon' => $icon,
+                                                       '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;
+                                               }
+                                               $output = elgg_view_list_item($entity, array(
+                                                       'use_hover' => false,
+                                                       'class' => 'elgg-autocomplete-item',
+                                               ));
+                                               $icon = elgg_view_entity_icon($entity, 'tiny', array(
+                                                       'use_hover' => false,
+                                               ));
+                                               $result = array(
+                                                       'type' => 'group',
+                                                       'name' => $entity->name,
+                                                       'desc' => strip_tags($entity->description),
+                                                       'guid' => $entity->guid,
+                                                       'label' => $output,
+                                                       'value' => $entity->guid,
+                                                       'icon' => $icon,
+                                                       'url' => $entity->getURL(),
+                                               );
++>>>>>>> 08a962c98e2923724f8013d6eaae89101243752a
  
 -                                              $results[$entity->name . rand(1, 100)] = $result;
 +                                              $results[$entity->name . rand(1, 100)] = $json;
                                        }
                                }
                                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;
+                                               }
+                                               $output = elgg_view_list_item($entity, array(
+                                                       'use_hover' => false,
+                                                       'class' => 'elgg-autocomplete-item',
+                                               ));
+                                               $icon = elgg_view_entity_icon($entity, 'tiny', array(
+                                                       'use_hover' => false,
+                                               ));
+                                               $result = array(
+                                                       'type' => 'user',
+                                                       'name' => $entity->name,
+                                                       'desc' => $entity->username,
+                                                       'guid' => $entity->guid,
+                                                       'label' => $output,
+                                                       'value' => $entity->username,
+                                                       'icon' => $icon,
+                                                       '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;
  }