From 1a673846064fc925a7f86e23c7295542a80796c4 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 30 Oct 2009 19:07:24 -0400 Subject: [PATCH] I guess we're not returning status AND results from ajax calls after all... --- ansel/lib/Ajax/Imple/LocationAutoCompleter.php | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php index 1042c15c1..f3eadd51d 100644 --- a/ansel/lib/Ajax/Imple/LocationAutoCompleter.php +++ b/ansel/lib/Ajax/Imple/LocationAutoCompleter.php @@ -60,19 +60,11 @@ class Ansel_Ajax_Imple_LocationAutoCompleter extends Horde_Ajax_Imple_AutoComple } $locs = $GLOBALS['ansel_storage']->searchLocations($input); if (is_a($locs, 'PEAR_Error')) { - return array('response' => 0); + Horde::logMessage($locs->getMessage(), __FILE__, __LINE__, PEAR_LOG_ERR); + $locs = array(); } - $results = $locs; - - if (count($results) == 0) { - $results = array('response' => 0, 'message' => array()); - } else { - $results = array('response' => count($results), - 'message' => Horde_Serialize::serialize($results, Horde_Serialize::JSON, Horde_Nls::getCharset())); - } - - return $results; + return Horde_Serialize::serialize($locs, Horde_Serialize::JSON, Horde_Nls::getCharset()); } } -- 2.11.0