Merge commit 'f2e0fb509a' into WebGUI8. Some tests still failing.
This commit is contained in:
commit
385931aaab
92 changed files with 1966 additions and 650 deletions
|
|
@ -208,7 +208,7 @@ Takes form variable badgeId and add the token to the cart.
|
|||
|
||||
sub www_addToCart {
|
||||
my ($self) = @_;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView;
|
||||
return $self->session->privilege->noAccess() unless $self->getParent->canView && $self->canView;
|
||||
my $badgeId = $self->session->form->get('badgeId');
|
||||
$self->addToCart({badgeId=>$badgeId});
|
||||
return $self->getParent->www_buildBadge($badgeId);
|
||||
|
|
|
|||
|
|
@ -329,7 +329,15 @@ sub getThingOptions {
|
|||
tie my %options, 'Tie::IxHash', ( "" => "" );
|
||||
my $thingyIter = WebGUI::Asset->getRoot($session)
|
||||
->getLineageIterator( ['descendants'], { includeOnlyClasses => ['WebGUI::Asset::Wobject::Thingy'], } );
|
||||
while ( my $thingy = $thingyIter->() ) {
|
||||
while ( 1 ) {
|
||||
my $thingy;
|
||||
eval { $thingy = $thingyIter->() };
|
||||
if ( my $x = WebGUI::Error->caught('WebGUI::Error::ObjectNotFound') ) {
|
||||
$session->log->error($x->full_message);
|
||||
next;
|
||||
}
|
||||
last unless $thingy;
|
||||
|
||||
tie my %things, 'Tie::IxHash', (
|
||||
$session->db->buildHash( "SELECT thingId, label FROM Thingy_things WHERE assetId=?", [ $thingy->getId ] ) );
|
||||
$options{ $thingy->title } = \%things;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue