[Rt-commit] rt branch, history-filter, updated. rt-3.8.8-96-gb9dbff5
Shawn Moore
sartak at bestpractical.com
Tue Jun 15 17:34:30 EDT 2010
The branch, history-filter has been updated
via b9dbff5a3460f4bf9c14d57e7616c6eaaf6c8a8d (commit)
from 3632ec5dcec952b34acb9fd0fd0151448952b545 (commit)
Summary of changes:
lib/RT/Transaction_Overlay.pm | 46 +++++++++++++++-------------------------
1 files changed, 17 insertions(+), 29 deletions(-)
- Log -----------------------------------------------------------------
commit b9dbff5a3460f4bf9c14d57e7616c6eaaf6c8a8d
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Tue Jun 15 17:35:12 2010 -0400
Revert "Put (fallback) into TypeMetadata too so extensions can override it"
This reverts commit e2596840f590fd1c13f197e1255839932974a9ad.
Having an entry in TypeMetadata unlike all the others is going to be
more of a hassle than a help..
diff --git a/lib/RT/Transaction_Overlay.pm b/lib/RT/Transaction_Overlay.pm
index 7af5e7b..945d87c 100755
--- a/lib/RT/Transaction_Overlay.pm
+++ b/lib/RT/Transaction_Overlay.pm
@@ -410,24 +410,6 @@ use HTML::TreeBuilder;
}
},
},
- '(fallback)' => {
- BriefDescription => sub {
- my $self = shift;
- my %args = @_;
-
- return $self->loc(
- "Default: [_1]/[_2] changed from [_3] to [_4]",
- $args{type},
- $self->Field,
- (
- $self->OldValue
- ? "'" . $self->OldValue . "'"
- : $self->loc("(no value)")
- ),
- "'" . $self->NewValue . "'"
- );
- },
- },
);
# }}}
@@ -967,20 +949,26 @@ sub BriefDescription {
return $self->loc("No transaction type specified");
}
- for my $lookup_type ($type, '(fallback)') {
- if ( my $code = $self->TypeMetadata(Type => $lookup_type, Field => 'BriefDescription') ) {
- my %args = (
- type => $type,
- obj_type => $self->FriendlyObjectType,
- );
+ if ( my $code = $self->TypeMetadata(Type => $type, Field => 'BriefDescription') ) {
+ my %args = (
+ obj_type => $self->FriendlyObjectType,
+ );
- my $description = $code->($self, %args);
- return $description if defined $description;
- }
+ my $description = $code->($self, %args);
+ return $description if defined $description;
}
- # this should never happen!
- return $self->loc("No transaction formatter found");
+ return $self->loc(
+ "Default: [_1]/[_2] changed from [_3] to [_4]",
+ $type,
+ $self->Field,
+ (
+ $self->OldValue
+ ? "'" . $self->OldValue . "'"
+ : $self->loc("(no value)")
+ ),
+ "'" . $self->NewValue . "'"
+ );
}
# }}}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list