$this->aAddressRankList = array();
$this->aStructuredQuery = array();
- $this->sAllowedTypesSQLList = False;
+ $this->sAllowedTypesSQLList = false;
$this->loadStructuredAddressElement($sAmenity, 'amenity', 26, 30, false);
$this->loadStructuredAddressElement($sStreet, 'street', 26, 30, false);
if (sizeof($aPlaceIDs) == 0) return array();
$sLanguagePrefArraySQL = getArraySQL(
- array_map("getDBQuoted",
- $this->aLangPrefOrder)
+ array_map("getDBQuoted", $this->aLangPrefOrder)
);
// Get the details for display (is this a redundant extra step?)
// If the token is valid
if (isset($aValidTokens[' '.$sToken])) {
- // Recheck if the original word shows up in the query.
- $bWordInQuery = false;
- if (isset($aSearchTerm['word']) && $aSearchTerm['word']) {
- $bWordInQuery = $this->normTerm($aSearchTerm['word']) !== false;
- }
foreach ($aValidTokens[' '.$sToken] as $aSearchTerm) {
+ // Recheck if the original word shows up in the query.
+ $bWordInQuery = false;
+ if (isset($aSearchTerm['word']) && $aSearchTerm['word']) {
+ $bWordInQuery = strpos(
+ $sNormQuery,
+ $this->normTerm($aSearchTerm['word'])
+ ) !== false;
+ }
$aNewSearches = $oCurrentSearch->extendWithFullTerm(
$aSearchTerm,
$bWordInQuery,
$aNewWordsetSearches[] = $oSearch;
}
}
-
}
}
}
$sNormQuery = $this->normTerm($this->sQuery);
$sLanguagePrefArraySQL = getArraySQL(
- array_map("getDBQuoted",
- $this->aLangPrefOrder)
+ array_map("getDBQuoted", $this->aLangPrefOrder)
);
$sCountryCodesSQL = false;
if ($this->aCountryCodes) {
);
} elseif ($oSearch->isOperator(Operator::POSTCODE)) {
$aPlaceIDs = $oSearch->queryPostcode(
- $oDB,
+ $this->oDB,
$sCountryCodesSQL,
$this->iLimit
);