Fix Calendar copy behavior. By default, duplicate will only copy
the Calendar. duplicateBranch must be called to copy it _and_ its children.
This commit is contained in:
parent
943e220508
commit
a71e494d34
2 changed files with 3 additions and 28 deletions
|
|
@ -21,6 +21,9 @@
|
|||
- fixed #4209: i18n in Rich edit in Dutch breaks
|
||||
- fixed #9196: Shelf lacks pagination
|
||||
- fixed #4208: EMS badges with Admin security visible to all
|
||||
- fixed Calendar copy behavior. In the Asset toolbar, Copy Just this Asset
|
||||
was broken. This has been fixed. As a side effect, in the Asset Manager
|
||||
the default behavior is to copy ONLY the Calendar, and none of the events.
|
||||
|
||||
7.6.4
|
||||
- Survey now will show progress and time limit.
|
||||
|
|
|
|||
|
|
@ -459,34 +459,6 @@ sub createSubscriptionGroup {
|
|||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 duplicate ( )
|
||||
|
||||
Duplicates an Event Calendar. Duplicates all the events in this Event Calendar.
|
||||
|
||||
=cut
|
||||
|
||||
sub duplicate {
|
||||
my $self = shift;
|
||||
|
||||
# Superclass duplicates the calendar
|
||||
my $newCalendar = $self->SUPER::duplicate(@_);
|
||||
|
||||
# Duplicate the events in this calendar
|
||||
my $events = $self->getLineage(["descendants"], {
|
||||
returnObjects => 1,
|
||||
includeOnlyClasses => ['WebGUI::Asset::Event'],
|
||||
});
|
||||
|
||||
for my $event (@{ $events }) {
|
||||
my %eventProperties = %{ $event->get() };
|
||||
$newCalendar->addChild(\%eventProperties);
|
||||
}
|
||||
|
||||
return $newCalendar;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 getEditForm
|
||||
|
||||
Adds an additional tab for feeds.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue