Commit 52741ef5 authored by Jesse Vincent's avatar Jesse Vincent
Browse files

Remove a bunch of calls to SUPER::$this that just invoked the autoload

subs. instead, actually call what they're calling.

This behavior depended on an old quirk of searchbuilder
parent d57c85f2
......@@ -619,7 +619,7 @@ per array entry. multiple lines are folded.
sub _SplitHeaders {
my $self = shift;
my $headers = (shift || $self->SUPER::Headers());
my $headers = (shift || $self->_Value('Headers'));
my @headers;
for (split(/\n(?=\w|\z)/,$headers)) {
push @headers, $_;
......
......@@ -282,7 +282,7 @@ sub SetContent {
return(0, "Content couldn't be frozen");
}
}
return $self->SUPER::SetContent( $content );
return $self->_Set( Field => 'Content', Value => $content );
}
=head2 SubValue KEY
......
......@@ -264,7 +264,7 @@ sub SetDisabled {
# if it's already disabled, we're good.
return (1) if ( $self->__Value('Disabled') == $val);
my $err = $self->SUPER::SetDisabled($val);
my $err = $self->_Set(Field => 'Disabled', Value => $val);
my ($retval, $msg) = $err->as_array();
unless ($retval) {
$RT::Logger->error( "Couldn't SetDisabled CachedGroupMember " . $self->Id .": $msg");
......
......@@ -644,7 +644,7 @@ sub SetType {
$RT::Logger->warning("'Single' and 'Multiple' on SetType deprecated, use SetMaxValues instead at (". join(":",caller).")");
$self->SetMaxValues($1 ? 1 : 0);
}
$self->SUPER::SetType($type);
$self->_Set(Field => 'Type', Value =>$type);
}
=head2 SetPattern STRING
......@@ -661,7 +661,7 @@ sub SetPattern {
my ($ok, $msg) = $self->_IsValidRegex($regex);
if ($ok) {
return $self->SUPER::SetPattern($regex);
return $self->_Set(Field => 'Pattern', Value => $regex);
}
else {
return (0, $self->loc("Invalid pattern: [_1]", $msg));
......@@ -968,7 +968,7 @@ sub SetLookupType {
$ObjectCustomFields->LimitToCustomField($self->Id);
$_->Delete foreach @{$ObjectCustomFields->ItemsArrayRef};
}
return $self->SUPER::SetLookupType($lookup);
return $self->_Set(Field => 'LookupType', Value =>$lookup);
}
=head2 LookupTypes
......
......@@ -174,7 +174,7 @@ content, try "LargeContent"
sub Content {
my $self = shift;
my $content = $self->SUPER::Content;
my $content = $self->_Value('Content');
if ( !(defined $content && length $content) && $self->ContentType && $self->ContentType eq 'text/plain' ) {
return $self->LargeContent;
} else {
......
......@@ -390,7 +390,7 @@ sub SetDisabled {
my $val = shift;
$RT::Handle->BeginTransaction();
my $set_err = $self->SUPER::SetDisabled($val);
my $set_err = $self->_Set( Field =>'Disabled', Value => $val);
unless ($set_err) {
$RT::Handle->Rollback();
$RT::Logger->warning("Couldn't ".($val == 1) ? "disable" : "enable"." queue ".$self->PrincipalObj->Id);
......
......@@ -808,7 +808,7 @@ sub SetPassword {
else {
my $new = !$self->HasPassword;
$password = $self->_GeneratePassword($password);
my ( $val, $msg ) = $self->SUPER::SetPassword($password);
my ( $val, $msg ) = $self->_Set(Field => 'Password', Value => $password);
if ($val) {
return ( 1, $self->loc("Password set") ) if $new;
return ( 1, $self->loc("Password changed") );
......@@ -906,7 +906,7 @@ sub IsPassword {
or $self->_GeneratePasswordBase64($value) eq $self->__Value('Password'))
{
# ...but upgrade the legacy password inplace.
$self->SUPER::SetPassword( $self->_GeneratePassword($value) );
$self->_Set(Field => 'Password', Value => $self->_GeneratePassword($value) );
return(1);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment