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:
b0c2c04
)
unreported bug in the new makeTitle(), disallow redirects to Special:Userlogout
author
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 11 Sep 2004 09:35:24 +0000
(09:35 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Sat, 11 Sep 2004 09:35:24 +0000
(09:35 +0000)
includes/Title.php
patch
|
blob
|
history
diff --git
a/includes/Title.php
b/includes/Title.php
index
3a17b3b
..
e577493
100644
(file)
--- a/
includes/Title.php
+++ b/
includes/Title.php
@@
-147,7
+147,7
@@
class Title {
$t->mFragment = '';
$t->mNamespace = $ns;
$t->mDbkeyform = $title;
- $t->mArticleID = ( $ns >= 0 ) ?
0 : -1
;
+ $t->mArticleID = ( $ns >= 0 ) ?
-1 : 0
;
$t->mUrlform = wfUrlencode( $title );
$t->mTextform = str_replace( '_', ' ', $title );
return $t;
@@
-185,6
+185,10
@@
class Title {
}
$rt = Title::newFromText( $m[1] );
+ # Disallow redirects to Special:Userlogout
+ if ( $rt->getNamespace() == NS_SPECIAL && preg_match( '/^Userlogout/i', $rt->getText ) ) {
+ $rt = NULL;
+ }
}
}
return $rt;