Thingy Things can now have no fields and still work
This commit is contained in:
parent
740ea67a15
commit
15d93174c4
2 changed files with 4 additions and 4 deletions
|
|
@ -35,7 +35,7 @@
|
|||
- fixed: I need a template for this display
|
||||
- fixed: If a user clicks on an unsubscribe link in an email and they are not logged into WebGUI, they are now prompted to log in so that they can then unsbscribe.
|
||||
- fixed: Using a password recovery token a second time informs the user of the reuse instead of having a style inside a style with a login form.
|
||||
|
||||
- fixed: Thingy Things can now have no fields and still be functional.
|
||||
7.5.22
|
||||
- fixed: Layout template now gets prepared correctly
|
||||
- fixed: When user does not have permissions to search/edit a thing a proper error is shown.
|
||||
|
|
|
|||
|
|
@ -2482,7 +2482,7 @@ sequenceNumber');
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
my $noFields = 0;
|
||||
if (scalar(@displayInSearchFields)){
|
||||
$query = "select thingDataId, ";
|
||||
$query .= join(", ",map {$dbh->quote_identifier('field_'.$_->{fieldId})} @displayInSearchFields);
|
||||
|
|
@ -2494,7 +2494,7 @@ sequenceNumber');
|
|||
}
|
||||
else{
|
||||
$self->session->errorHandler->warn("The default Thing has no fields selected to display in the search.");
|
||||
return undef;
|
||||
$noFields = 1;
|
||||
}
|
||||
|
||||
# store query in cache for thirty minutes
|
||||
|
|
@ -2504,7 +2504,7 @@ sequenceNumber');
|
|||
$currentUrl .= ";orderBy=".$orderBy if ($orderBy);
|
||||
|
||||
$p = WebGUI::Paginator->new($self->session,$currentUrl,$thingProperties->{thingsPerPage}, undef, $paginatePage);
|
||||
$p->setDataByQuery($query);
|
||||
$p->setDataByQuery($query) if ! $noFields;
|
||||
$searchResults = $p->getPageData($paginatePage);
|
||||
foreach my $searchResult (@$searchResults){
|
||||
my (@field_loop);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue