Do not apply limit where we have a sub-search

This commit is contained in:
Brian Quinion 2011-04-28 14:55:25 +00:00
parent 5f97080c73
commit f561a3d1c7

View File

@ -754,7 +754,7 @@
$sSQL .= " from search_name";
$sSQL .= " where ".join(' and ',$aTerms);
$sSQL .= " order by ".join(', ',$aOrder);
if ($aSearch['sHouseNumber'])
if ($aSearch['sHouseNumber'] || $aSearch['sClass'])
$sSQL .= " limit 50";
elseif (!sizeof($aSearch['aName']) && !sizeof($aSearch['aAddress']) && $aSearch['sClass'])
$sSQL .= " limit 1";