[Rt-commit] r3793 - in rt/branches/CHALDEA-EXPERIMENTAL: . etc
html/Elements lib/RT
jesse at bestpractical.com
jesse at bestpractical.com
Fri Sep 2 12:06:54 EDT 2005
Author: jesse
Date: Fri Sep 2 12:06:53 2005
New Revision: 3793
Modified:
rt/branches/CHALDEA-EXPERIMENTAL/ (props changed)
rt/branches/CHALDEA-EXPERIMENTAL/etc/RT_Config.pm.in
rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext
rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm
rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Record.pm
Log:
r14078 at hualien: jesse | 2005-08-30 05:56:57 -0400
r13548 at hualien: jesse | 2005-08-19 10:41:25 -0400
r7393 at hualien (orig r3603): alexmv | 2005-08-04 16:11:05 -0400
r5647 at zoq-fot-pik: chmrr | 2005-08-04 16:04:03 -0400
* Add $RT::WikiImplicitLinks option (defaults to false)
* Support for Wiki links doing useful things
Modified: rt/branches/CHALDEA-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/etc/RT_Config.pm.in (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/etc/RT_Config.pm.in Fri Sep 2 12:06:53 2005
@@ -329,6 +329,12 @@
# Default wrapping: "HARD" (choices "SOFT", "HARD")
Set($MessageBoxWrap, "HARD");
+# Support implicit links in WikiText custom fields? A true value
+# causes InterCapped or ALLCAPS words in WikiText fields to
+# automatically become links to searches for those words. If used on
+# RTFM articles, it links to the RTFM article with that name.
+Set($WikiImplicitLinks, 0);
+
# if TrustHTMLAttachments is not defined, we will display them
# as text. This prevents malicious HTML and javascript from being
# sent in a request (although there is probably more to it than that)
Modified: rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext Fri Sep 2 12:06:53 2005
@@ -45,7 +45,8 @@
%# END BPS TAGGED BLOCK }}}
% my $content = $Object->LargeContent || $Object->Content;
% $content = $m->comp('/Elements/ScrubHTML', Content => $content);
-% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => 1} );
+% my $base = $Object->Object->WikiBase;
+% my $wiki_content = Text::WikiFormat::format( $content."\n" , {}, { extended => 1, absolute_links => 1, implicit_links => $RT::WikiImplicitLinks, prefix => $base} );
<%$wiki_content|n%>
<%init>
use Text::WikiFormat;
Modified: rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm Fri Sep 2 12:06:53 2005
@@ -166,6 +166,13 @@
}
+sub Object {
+ my $self = shift;
+ my $Object = $self->__Value('ObjectType')->new($self->CurrentUser);
+ $Object->Load($self->__Value('ObjectId'));
+ return($Object);
+}
+
sub Delete {
my $self = shift;
$self->SetDisabled(1);
Modified: rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Record.pm (original)
+++ rt/branches/CHALDEA-EXPERIMENTAL/lib/RT/Record.pm Fri Sep 2 12:06:53 2005
@@ -1863,6 +1863,10 @@
sub BasicColumns {
}
+sub WikiBase {
+ return $RT::WebPath. "/index.html?q=";
+}
+
eval "require RT::Record_Vendor";
die $@ if ($@ && $@ !~ qr{^Can't locate RT/Record_Vendor.pm});
eval "require RT::Record_Local";
More information about the Rt-commit
mailing list