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:
0d55419
)
Fix r40194, which was obviously incorrect. There's no reason $sectionTitle should...
author
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 1 Sep 2008 15:05:25 +0000
(15:05 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Mon, 1 Sep 2008 15:05:25 +0000
(15:05 +0000)
includes/Linker.php
patch
|
blob
|
history
diff --git
a/includes/Linker.php
b/includes/Linker.php
index
3f8f802
..
cc02241
100644
(file)
--- a/
includes/Linker.php
+++ b/
includes/Linker.php
@@
-1219,13
+1219,10
@@
class Linker {
if ( $local ) {
$sectionTitle = Title::newFromText( '#' . $section );
} else {
if ( $local ) {
$sectionTitle = Title::newFromText( '#' . $section );
} else {
- $sectionTitle =
clone( $title );
-
$sectionTitle->mFragment = $section
;
+ $sectionTitle =
Title::makeTitleSafe( $title->getNamespace(),
+
$title->getDBkey(), $section )
;
}
}
- # FIXME: $sectionTitle should probably always be valid at this
- # point, but in some scenarios it's not (bug 15351). Is this cor-
- # rect?
- if( $title instanceof Title ) {
+ if ( $sectionTitle ) {
$link = $this->link( $sectionTitle,
wfMsgForContent( 'sectionlink' ), array(), array(),
'noclasses' );
$link = $this->link( $sectionTitle,
wfMsgForContent( 'sectionlink' ), array(), array(),
'noclasses' );