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:
4555a1c
)
Revert breakage in secureAndSplit() which failed to remove head/trail
author
Brion Vibber
<brion@users.mediawiki.org>
Fri, 9 Apr 2004 00:45:15 +0000
(
00:45
+0000)
committer
Brion Vibber
<brion@users.mediawiki.org>
Fri, 9 Apr 2004 00:45:15 +0000
(
00:45
+0000)
whitespace if provided as underlines.
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
365378e
..
18bec83
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-601,7
+601,15
@@
class Title {
# Clean up whitespace
#
- $t = preg_replace( "/[\\s_]+/", "_", trim($this->mDbkeyform) );
+ $t = preg_replace( "/[\\s_]+/", "_", $this->mDbkeyform );
+ if ( "_" == @$t{0} ) {
+ $t = substr( $t, 1 );
+ }
+ $l = strlen( $t );
+ if ( $l && ( "_" == $t{$l-1} ) ) {
+ $t = substr( $t, 0, $l-1 );
+ }
+
if ( "" == $t ) {
wfProfileOut( $fname );
return false;