Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (scalar(@displayInSearchFields)){
- $query = "select thingDataId, ";
- if ($thingProperties->{exportMetaData}){
- $query .= "dateCreated, createdById, updatedById, updatedByName, lastUpdated, ipAddress, ";
- }
- $query .= join(", ",map {$dbh->quote_identifier('field_'.$_->{fieldId})} @displayInSearchFields);
- $query .= " from ".$dbh->quote_identifier("Thingy_".$thingId);
- 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);
- }
- }
- else{
- $self->session->errorHandler->warn("The default Thing has no fields selected to display in the search.");
- $noFields = 1;
- }
Add Comment
Please, Sign In to add comment