[Rt-commit] r19466 - rt/3.999/branches/config-in-db/share/html/Elements
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed May 6 13:08:42 EDT 2009
Author: sunnavy
Date: Wed May 6 13:08:42 2009
New Revision: 19466
Modified:
rt/3.999/branches/config-in-db/share/html/Elements/PageLayout
Log:
don't add '/' if $href already has one
Modified: rt/3.999/branches/config-in-db/share/html/Elements/PageLayout
==============================================================================
--- rt/3.999/branches/config-in-db/share/html/Elements/PageLayout (original)
+++ rt/3.999/branches/config-in-db/share/html/Elements/PageLayout Wed May 6 13:08:42 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