[Rt-commit] r3603 - in rt/branches/QUEBEC-EXPERIMENTAL: . etc html/Elements lib/RT

alexmv at bestpractical.com alexmv at bestpractical.com
Thu Aug 4 16:11:06 EDT 2005


Author: alexmv
Date: Thu Aug  4 16:11:05 2005
New Revision: 3603

Modified:
   rt/branches/QUEBEC-EXPERIMENTAL/   (props changed)
   rt/branches/QUEBEC-EXPERIMENTAL/etc/RT_Config.pm.in
   rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext
   rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm
   rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Record.pm
Log:
 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/QUEBEC-EXPERIMENTAL/etc/RT_Config.pm.in
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/etc/RT_Config.pm.in	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/etc/RT_Config.pm.in	Thu Aug  4 16:11:05 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/QUEBEC-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/html/Elements/ShowCustomFieldWikitext	Thu Aug  4 16:11:05 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/QUEBEC-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/ObjectCustomFieldValue_Overlay.pm	Thu Aug  4 16:11:05 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/QUEBEC-EXPERIMENTAL/lib/RT/Record.pm
==============================================================================
--- rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Record.pm	(original)
+++ rt/branches/QUEBEC-EXPERIMENTAL/lib/RT/Record.pm	Thu Aug  4 16:11:05 2005
@@ -1862,6 +1862,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