[Rt-commit] r19569 - in rt/3.999/trunk: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu May 7 03:38:44 EDT 2009


Author: sunnavy
Date: Thu May  7 03:38:44 2009
New Revision: 19569

Modified:
   rt/3.999/trunk/   (props changed)
   rt/3.999/trunk/share/html/Elements/PageLayout

Log:
 r21019 at sunnavys-mb (orig r19466):  sunnavy | 2009-05-07 01:08:42 +0800
 don't add '/' if $href already  has one


Modified: rt/3.999/trunk/share/html/Elements/PageLayout
==============================================================================
--- rt/3.999/trunk/share/html/Elements/PageLayout	(original)
+++ rt/3.999/trunk/share/html/Elements/PageLayout	Thu May  7 03:38:44 2009
@@ -93,8 +93,12 @@
          $class->{li} = join ' ', @li;
 
          my $href = $page_tabs->{$tab}->{'path'} || "";
-         $href = RT->config->get('web_path') .'/'. $href
-            unless $path =~ /^\w+:/;
+         unless ( $path =~ m!^\w+:! ) {
+             $href =
+                 RT->config->get('web_path')
+               . ( $href =~ m{^/} ? '' : '/' )
+               . $href;
+         }
          my $target = $page_tabs->{$tab}->{'target'} || '';
          $target = $m->interp->apply_escapes( $target, 'h' );
 </%perl>


More information about the Rt-commit mailing list