diff options
Diffstat (limited to 'engine/lib/input.php')
| -rw-r--r-- | engine/lib/input.php | 11 | 
1 files changed, 9 insertions, 2 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php index 6d1646e1a..2d9bae4dd 100644 --- a/engine/lib/input.php +++ b/engine/lib/input.php @@ -226,6 +226,8 @@ function elgg_clear_sticky_value($form_name, $variable) {  /**   * Page handler for autocomplete endpoint.   * + * @todo split this into functions/objects, this is way too big + *   * /livesearch?q=<query>   *   * Other options include: @@ -233,6 +235,7 @@ function elgg_clear_sticky_value($form_name, $variable) {   *     match_owner int    0/1   *     limit       int    default is 10   * + * @param array $page   * @return string JSON string is returned and then exit   * @access private   */ @@ -265,10 +268,8 @@ function input_livesearch_page_handler($page) {  	}  	if (get_input('match_owner', false)) { -		$owner_guid = $user->getGUID();  		$owner_where = 'AND e.owner_guid = ' . $user->getGUID();  	} else { -		$owner_guid = null;  		$owner_where = '';  	} @@ -289,7 +290,9 @@ function input_livesearch_page_handler($page) {  				if ($entities = get_data($query)) {  					foreach ($entities as $entity) { +						// @todo use elgg_get_entities (don't query in a loop!)  						$entity = get_entity($entity->guid); +						/* @var ElggUser $entity */  						if (!$entity) {  							continue;  						} @@ -338,7 +341,9 @@ function input_livesearch_page_handler($page) {  				";  				if ($entities = get_data($query)) {  					foreach ($entities as $entity) { +						// @todo use elgg_get_entities (don't query in a loop!)  						$entity = get_entity($entity->guid); +						/* @var ElggGroup $entity */  						if (!$entity) {  							continue;  						} @@ -385,7 +390,9 @@ function input_livesearch_page_handler($page) {  				if ($entities = get_data($query)) {  					foreach ($entities as $entity) { +						// @todo use elgg_get_entities (don't query in a loop!)  						$entity = get_entity($entity->guid); +						/* @var ElggUser $entity */  						if (!$entity) {  							continue;  						}  | 
