dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SpecialVersion: Handle Closures in $wgHooks nicer
[lhc/web/wiklou.git]
/
includes
/
Linker.php
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
4a1aa87
..
d6a4056
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-77,7
+77,7
@@
class Linker {
wfDeprecated( __METHOD__, '1.25' );
$title = urldecode( $title );
wfDeprecated( __METHOD__, '1.25' );
$title = urldecode( $title );
- $title = str
_replace( '_', ' ', $title
);
+ $title = str
tr( $title, '_', ' '
);
return self::getLinkAttributesInternal( $title, $class );
}
return self::getLinkAttributesInternal( $title, $class );
}
@@
-1414,10
+1414,9
@@
class Linker {
# fix up urlencoded title texts (copied from Parser::replaceInternalLinks)
if ( strpos( $match[1], '%' ) !== false ) {
# fix up urlencoded title texts (copied from Parser::replaceInternalLinks)
if ( strpos( $match[1], '%' ) !== false ) {
- $match[1] = str_replace(
- array( '<', '>' ),
- array( '<', '>' ),
- rawurldecode( $match[1] )
+ $match[1] = strtr(
+ rawurldecode( $match[1] ),
+ array( '<' => '<', '>' => '>' )
);
}
);
}
@@
-1705,8
+1704,7
@@
class Linker {
}
/**
}
/**
- * Generate a table of contents from a section tree
- * Currently unused.
+ * Generate a table of contents from a section tree.
*
* @param array $tree Return value of ParserOutput::getSections()
* @param string|Language|bool $lang Language for the toc title, defaults to user language
*
* @param array $tree Return value of ParserOutput::getSections()
* @param string|Language|bool $lang Language for the toc title, defaults to user language