dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0b06a4f
)
Remove any additional trailing slashes when subpaging is enabled
author
Antoine Musso
<hashar@users.mediawiki.org>
Sun, 21 Jan 2007 03:47:38 +0000
(
03:47
+0000)
committer
Antoine Musso
<hashar@users.mediawiki.org>
Sun, 21 Jan 2007 03:47:38 +0000
(
03:47
+0000)
includes/Parser.php
patch
|
blob
|
history
diff --git
a/includes/Parser.php
b/includes/Parser.php
index
17ee937
..
587c637
100644
(file)
--- a/
includes/Parser.php
+++ b/
includes/Parser.php
@@
-1922,9
+1922,9
@@
class Parser
# Look at the first character
if( $target != '' && $target{0} == '/' ) {
# / at end means we don't want the slash to be shown
- if( substr( $target, -1, 1 ) == '/' ) {
- $target = substr( $target, 1, -1 );
- $noslash = $target;
+ $trailingSlashes = preg_match_all( '%(/+)$%', $target, $m );
+ if( $trailingSlashes ) {
+ $noslash = $target
= substr( $target, 1, -strlen($m[0][0]) )
;
} else {
$noslash = substr( $target, 1 );
}