fixed #9219: Thingy After Save Search This Thing not showing all rows

This commit is contained in:
Yung Han Khoe 2008-12-07 17:25:17 +00:00
parent 8ba4f6ef70
commit 77aefb85e6
2 changed files with 6 additions and 1 deletions

View file

@ -3090,7 +3090,10 @@ sequenceNumber');
}
$query .= join(", ",map {$dbh->quote_identifier('field_'.$_->{fieldId})} @displayInSearchFields);
$query .= " from ".$dbh->quote_identifier("Thingy_".$thingId);
$query .= " where ".join(" and ",@constraints) if (scalar(@constraints) > 0);
if($session->form->process('func') eq 'search'){
# Don't add constraints when the search screen is displayed as an 'after save' option.
$query .= " where ".join(" and ",@constraints) if (scalar(@constraints) > 0);
}
if ($orderBy){
$query .= " order by ".$dbh->quote_identifier("field_".$orderBy);
}