Forward port of isHidden work from 7.3 for Post, Event and WikiPage.
isHidden is not allowed to be 0 for those Assets. I had to reinstantiate the update method for the Event Asset, but I only put in the code to force isHidden to be forced to 1.
This commit is contained in:
parent
7abd54eb94
commit
0c45e5286e
4 changed files with 45 additions and 21 deletions
|
|
@ -61,7 +61,9 @@
|
|||
http://www.webgui.org/bugs/tracker/spectre-should-check-that-it-has-a-valid-workflow#lHx4BxEUxcacX7rS5VLxeg
|
||||
- fix: Problems with thumbnails (perlDreamer Consulting, LLC)
|
||||
http://www.webgui.org/bugs/tracker/problems-with-thumbnails
|
||||
|
||||
- fix: CS branch error (perlDreamer Consulting, LLC)
|
||||
http://www.webgui.org/bugs/tracker/cs-branch-error
|
||||
- fix: Package deploy: hidden assets become visible (Yung Han Khoe, United Knowledge)
|
||||
|
||||
7.3.18
|
||||
- fix: Old registrants appear in new EMS asset
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ sub definition {
|
|||
},
|
||||
|
||||
'relatedLinks' => {
|
||||
fieldType => "HTMLarea",
|
||||
fieldType => "HTMLArea",
|
||||
defaultValue => undef,
|
||||
},
|
||||
'location' => {
|
||||
|
|
@ -171,10 +171,6 @@ sub canEdit {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
####################################################################
|
||||
|
||||
=head2 generateRecurringEvents ( )
|
||||
|
|
@ -1415,7 +1411,6 @@ sub processPropertiesFromFormPost {
|
|||
|
||||
### Form is verified
|
||||
# Events are always hidden from navigation
|
||||
$self->update({ isHidden => 1 });
|
||||
|
||||
if (!$self->get("groupIdEdit")) {
|
||||
my $groupIdEdit = $self->getParent->get("groupIdEventEdit")
|
||||
|
|
@ -1655,8 +1650,20 @@ sub setRelatedLinks {
|
|||
});
|
||||
}
|
||||
|
||||
####################################################################
|
||||
|
||||
=head2 update
|
||||
|
||||
Wrap update so that isHidden is always set to be a 1.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
$properties->{isHidden} = 1;
|
||||
return $self->SUPER::update($properties);
|
||||
}
|
||||
|
||||
|
||||
####################################################################
|
||||
|
|
|
|||
|
|
@ -79,7 +79,6 @@ sub addRevision {
|
|||
delete $newSelf->{_thread};
|
||||
}
|
||||
$newSelf->update({
|
||||
isHidden => 1,
|
||||
dateUpdated=>$now,
|
||||
});
|
||||
|
||||
|
|
@ -1037,19 +1036,21 @@ We overload the update method from WebGUI::Asset in order to handle file system
|
|||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my %before = (
|
||||
owner => $self->get("ownerUserId"),
|
||||
view => $self->get("groupIdView"),
|
||||
edit => $self->get("groupIdEdit")
|
||||
);
|
||||
$self->SUPER::update(@_);
|
||||
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
||||
my $storage = $self->getStorageLocation;
|
||||
if (-d $storage->getPath) {
|
||||
$storage->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit"));
|
||||
}
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
my %before = (
|
||||
owner => $self->get("ownerUserId"),
|
||||
view => $self->get("groupIdView"),
|
||||
edit => $self->get("groupIdEdit")
|
||||
);
|
||||
$properties->{isHidden} = 1;
|
||||
$self->SUPER::update($properties, @_);
|
||||
if ($self->get("ownerUserId") ne $before{owner} || $self->get("groupIdEdit") ne $before{edit} || $self->get("groupIdView") ne $before{view}) {
|
||||
my $storage = $self->getStorageLocation;
|
||||
if (-d $storage->getPath) {
|
||||
$storage->setPrivileges($self->get("ownerUserId"),$self->get("groupIdView"),$self->get("groupIdEdit"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -237,7 +237,6 @@ sub processPropertiesFromFormPost {
|
|||
|
||||
$self->update({ groupIdView => $self->getWiki->get('groupIdView'),
|
||||
groupIdEdit => $self->getWiki->get('groupToAdminister'),
|
||||
isHidden => 1,
|
||||
actionTakenBy => $self->session->user->userId,
|
||||
actionTaken => $actionTaken,
|
||||
});
|
||||
|
|
@ -297,6 +296,21 @@ sub scrubContent {
|
|||
return $scrubbedContent;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 update
|
||||
|
||||
Wrap update to force isHidden to be on, all the time.
|
||||
|
||||
=cut
|
||||
|
||||
sub update {
|
||||
my $self = shift;
|
||||
my $properties = shift;
|
||||
$properties->{isHidden} = 1;
|
||||
$self->SUPER::update($properties, @_);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub view {
|
||||
my $self = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue