Remove override of update and use Moose method modifiers instead.
This commit is contained in:
parent
44f03502b6
commit
9c7bbc849b
1 changed files with 9 additions and 16 deletions
|
|
@ -55,7 +55,15 @@ property isFeatured => (
|
||||||
noFormPost => 1,
|
noFormPost => 1,
|
||||||
);
|
);
|
||||||
|
|
||||||
use Tie::IxHash;
|
around isHidden => sub {
|
||||||
|
my $orig = shift;
|
||||||
|
my $self = shift;
|
||||||
|
if (@_ > 0) {
|
||||||
|
$_[0] = 1;
|
||||||
|
}
|
||||||
|
$self->$orig(@_);
|
||||||
|
};
|
||||||
|
|
||||||
use WebGUI::International;
|
use WebGUI::International;
|
||||||
use WebGUI::Utility;
|
use WebGUI::Utility;
|
||||||
|
|
||||||
|
|
@ -463,21 +471,6 @@ sub scrubContent {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
=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;
|
|
||||||
return $self->next::method($properties);
|
|
||||||
}
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
=head2 validParent
|
=head2 validParent
|
||||||
|
|
||||||
Make sure that the current session asset is a WikiMaster for pasting and adding checks.
|
Make sure that the current session asset is a WikiMaster for pasting and adding checks.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue