Remove override of update and use Moose method modifiers instead.

This commit is contained in:
Colin Kuskie 2010-02-15 15:11:12 -08:00
parent 44f03502b6
commit 9c7bbc849b

View file

@ -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.