[Rt-commit] [rtir] 06/18: Additional rewriting of urls in RTIR

Jesse Vincent jesse at bestpractical.com
Wed Mar 11 03:36:44 EDT 2015


This is an automated email from the git hooks/post-receive script.

jesse pushed a commit to branch 3.4/remove_old_constituencies
in repository rtir.

commit fbda59b9db98c9ec07bcf3e4f994ef75ff90e125
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 10 19:46:32 2015 -0700

    Additional rewriting of urls in RTIR
---
 html/RTIR/Display.html                | 2 +-
 html/RTIR/Elements/AttachReports      | 4 ++--
 html/RTIR/Incident/Display.html       | 2 +-
 html/RTIR/Search/Elements/ShowResults | 2 +-
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/html/RTIR/Display.html b/html/RTIR/Display.html
index 4b00b26..93c3852 100644
--- a/html/RTIR/Display.html
+++ b/html/RTIR/Display.html
@@ -159,7 +159,7 @@
         ForwardPath    => RT::IR->HREFTo("Forward.html"),
         EncryptionPath => RT::IR->HREFTo("Crypt.html"),
         WarnUnsigned   => 1,
-        PathPrefix     => RT->Config->Get('WebPath') ."/Ticket/",
+        PathPrefix     => RT::IR->HREFTo("Ticket/"),
     &>
 % }
 
diff --git a/html/RTIR/Elements/AttachReports b/html/RTIR/Elements/AttachReports
index cb2e647..e77fa41 100644
--- a/html/RTIR/Elements/AttachReports
+++ b/html/RTIR/Elements/AttachReports
@@ -82,8 +82,8 @@ $siblings->_DoSearch;
 return unless $siblings->Count;
 
 my $Format = q{
-    '<b><a HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></b>/TITLE:#',
-    '<b><a href="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></b>/TITLE:Subject',
+    '<b><a HREF="'.RT::IR->HREFTo('/Ticket/Display.html?id=__id__').'">__id__</a></b>/TITLE:#',
+    '<b><a href="'.RT::IR->HREFTo('/Ticket/Display.html?id=__id__').'">__Subject__</a></b>/TITLE:Subject',
     '__Status__',
     __LastUpdatedRelative__, __CreatedRelative__
 };
diff --git a/html/RTIR/Incident/Display.html b/html/RTIR/Incident/Display.html
index 0be2c38..79c43fe 100644
--- a/html/RTIR/Incident/Display.html
+++ b/html/RTIR/Incident/Display.html
@@ -161,7 +161,7 @@
         UpdatePath     => RT::IR->HREFTo("Update.html"),
         ForwardPath    => RT::IR->HREFTo("Forward.html"),
         EncryptionPath => RT::IR->HREFTo("Crypt.html"),
-        PathPrefix     => RT->Config->Get('WebPath') ."/Ticket/",
+        PathPrefix     => RT::IR->HREFTo("Ticket/")
     &>
 % }
 
diff --git a/html/RTIR/Search/Elements/ShowResults b/html/RTIR/Search/Elements/ShowResults
index c697e6f..fc1c988 100644
--- a/html/RTIR/Search/Elements/ShowResults
+++ b/html/RTIR/Search/Elements/ShowResults
@@ -54,7 +54,7 @@ else {
     $Query ||= $BaseQuery;
 }
 
-$BaseURL = RT->Config->Get('WebPath')."/$BaseURL" unless $BaseURL =~ m{^/};
+$BaseURL = RT::IR->HREFTo("$BaseURL") unless $BaseURL =~ m{^/};
 $BaseURL .= ( $BaseURL =~ /\?/ )? '&': '?' unless $BaseURL =~ m{[&?]$};
 
 my $collection = RT::Tickets->new( $session{'CurrentUser'} );

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list