From ccca9564b23d6f860d46ccdb86a7578e74b7a534 Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 7 Feb 2011 02:38:51 +0000 Subject: Fixes #2335 #2336 clean up and minor standardization of search plugin - needs html/css clean up git-svn-id: http://code.elgg.org/elgg/trunk@8057 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/start.php | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) (limited to 'mod/search/start.php') diff --git a/mod/search/start.php b/mod/search/start.php index ac61963d4..71473632c 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -1,14 +1,13 @@ $offsets[$i+1]) { + while (array_key_exists($i+1, $offsets) && $end_pos > $offsets[$i+1]) { $i++; if (!array_key_exists($i, $offsets)) { break; @@ -329,7 +326,7 @@ function search_remove_ignored_words($query, $format = 'array') { * * @param array $results * @param array $params - * @param string $view_type = listing, entity or listing + * @param string $view_type = listing, entity or layout * @return string */ function search_get_search_view($params, $view_type) { @@ -456,7 +453,7 @@ function search_get_order_by_sql($entities_table, $type_table, $sort, $order) { default: case 'relevance': // default is relevance descending. - // acending relevancy is silly and complicated. + // ascending relevancy is silly and complicated. $on = ''; break; case 'created': @@ -488,6 +485,3 @@ function search_get_order_by_sql($entities_table, $type_table, $sort, $order) { return $order_by; } -/** Register init system event **/ - -elgg_register_event_handler('init','system','search_init'); -- cgit v1.2.3