[Rt-commit] r3195 - in rtfm/branches/2.1-TESTING: . lib/RT/URI
jesse at bestpractical.com
jesse at bestpractical.com
Wed Jun 15 21:22:00 EDT 2005
Author: jesse
Date: Wed Jun 15 21:21:59 2005
New Revision: 3195
Modified:
rtfm/branches/2.1-TESTING/ (props changed)
rtfm/branches/2.1-TESTING/lib/RT/URI/a.pm
rtfm/branches/2.1-TESTING/lib/RT/URI/fsck_com_rtfm.pm
Log:
r20578 at hualien: jesse | 2005-06-15 21:20:39 -0400
* Made RTFM article links have pretty explanatory text
Modified: rtfm/branches/2.1-TESTING/lib/RT/URI/a.pm
==============================================================================
--- rtfm/branches/2.1-TESTING/lib/RT/URI/a.pm (original)
+++ rtfm/branches/2.1-TESTING/lib/RT/URI/a.pm Wed Jun 15 21:21:59 2005
@@ -25,11 +25,8 @@
use RT::FM::Article;
-use RT::URI::base;
-
use strict;
-use vars qw(@ISA);
- at ISA = qw/RT::URI::fsck_com_rtfm/;
+use base qw/RT::URI::fsck_com_rtfm/;
my $scheme = "a";
@@ -71,6 +68,7 @@
# articles after stripping off the a: prefix.
if ($uri =~ /^$scheme:(\d+)/) {
+ warn $1;
return $self->SUPER::ParseURI($1);
} else {
$self->{'uri'} = $uri;
Modified: rtfm/branches/2.1-TESTING/lib/RT/URI/fsck_com_rtfm.pm
==============================================================================
--- rtfm/branches/2.1-TESTING/lib/RT/URI/fsck_com_rtfm.pm (original)
+++ rtfm/branches/2.1-TESTING/lib/RT/URI/fsck_com_rtfm.pm Wed Jun 15 21:21:59 2005
@@ -212,4 +212,22 @@
}
+=head2 AsString
+
+Return "Article 23"
+
+=cut
+
+sub AsString {
+ my $self = shift;
+ if ($self->IsLocal && $self->Object) {
+ return $self->loc('Article [_1]', $self->Object->id);
+
+ } else {
+ return $self->SUPER::AsString(@_);
+ }
+
+}
+
+
1;
More information about the Rt-commit
mailing list