]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
fix more syntax errors in error functions
[nominatim.git] / lib / Geocode.php
index aa65cb69faebc22bf37e8f899c761f9260e8f117..876a40b585692e9017f9cba2762d87ec97287575 100644 (file)
 
                        $sSQL .= " order by importance desc";
                        if (CONST_Debug) { echo "<hr>"; var_dump($sSQL); }
-                       $aSearchResults = chksql($this->oDB->getAll($sSQL);
+                       $aSearchResults = chksql($this->oDB->getAll($sSQL),
                                                 "Could not get details for place.");
 
                        return $aSearchResults;
                                $sViewboxCentreSQL .= ")'::geometry,4326)";
 
                                $sSQL = "select st_buffer(".$sViewboxCentreSQL.",".(float)($_GET['routewidth']/69).")";
-                               $this->sViewboxSmallSQL = chksql($this->oDB->getOne($sSQL);
+                               $this->sViewboxSmallSQL = chksql($this->oDB->getOne($sSQL),
                                                                 "Could not get small viewbox.");
                                $this->sViewboxSmallSQL = "'".$this->sViewboxSmallSQL."'::geometry";
 
                                                                        $sSQL .= " limit ".$this->iLimit;
 
                                                                if (CONST_Debug) { var_dump($sSQL); }
-                                                               $aViewBoxPlaceIDs = chksql($this->oDB->getAll($sSQL));
+                                                               $aViewBoxPlaceIDs = chksql($this->oDB->getAll($sSQL),
                                                                                           "Could not get places for search terms.");
-                                                               }
                                                                //var_dump($aViewBoxPlaceIDs);
                                                                // Did we have an viewbox matches?
                                                                $aPlaceIDs = array();
 
                                                }
 
-                                               if (PEAR::IsError($aPlaceIDs))
-                                               {
-                                                       failInternalError("Could not get place IDs from tokens." ,$sSQL, $aPlaceIDs);
-                                               }
-
                                                if (CONST_Debug) { echo "<br><b>Place IDs:</b> "; var_Dump($aPlaceIDs); }
 
                                                foreach($aPlaceIDs as $iPlaceID)