[Rt-commit] rt branch, 4.0/avoid-absolute-links, updated. rt-4.0.4-187-gbea84dd

Alex Vandiver alexmv at bestpractical.com
Wed Jan 25 20:47:55 EST 2012


The branch, 4.0/avoid-absolute-links has been updated
       via  bea84dd9b5370124852c5b9f7a3c71c7d754a0d5 (commit)
      from  65cb87851b4710449c8ff98bb4ae5376b15ef5aa (commit)

Summary of changes:
 lib/RT/URI/fsck_com_article.pm |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit bea84dd9b5370124852c5b9f7a3c71c7d754a0d5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jan 25 20:45:01 2012 -0500

    The incorrect additional / caused URI->rel to generate "///Articles/...."
    
    WebURL should never have a explicitly / after it; while generally
    harmless, it combines poorly with the use of URI->rel, which shortens it
    to "///Articles/Articles/Article/Display.html", which means "the current
    scheme, the host articles, and path /Articles/Article/Display.html"
    which is absolutely incorrect.
    
    Strip the extra / from the URI which arcticles' HREF was adding.

diff --git a/lib/RT/URI/fsck_com_article.pm b/lib/RT/URI/fsck_com_article.pm
index 503434a..0c09b7c 100644
--- a/lib/RT/URI/fsck_com_article.pm
+++ b/lib/RT/URI/fsck_com_article.pm
@@ -188,7 +188,7 @@ Otherwise, return its URI
 sub HREF {
     my $self = shift;
     if ($self->IsLocal && $self->Object) {
-        return ( RT->Config->Get('WebURL') . "/Articles/Article/Display.html?id=".$self->Object->Id);
+        return ( RT->Config->Get('WebURL') . "Articles/Article/Display.html?id=".$self->Object->Id);
     }   
     else {
         return ($self->URI);

-----------------------------------------------------------------------


More information about the Rt-commit mailing list