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:
f75ac18
)
Fix a bug of LanguageConverter::findVariantLink(). If the article has already existed...
author
Philip Tzou
<philip@users.mediawiki.org>
Mon, 10 Aug 2009 08:01:08 +0000
(08:01 +0000)
committer
Philip Tzou
<philip@users.mediawiki.org>
Mon, 10 Aug 2009 08:01:08 +0000
(08:01 +0000)
languages/LanguageConverter.php
patch
|
blob
|
history
diff --git
a/languages/LanguageConverter.php
b/languages/LanguageConverter.php
index
07f1619
..
4740e00
100644
(file)
--- a/
languages/LanguageConverter.php
+++ b/
languages/LanguageConverter.php
@@
-547,6
+547,11
@@
class LanguageConverter {
* @public
*/
function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
* @public
*/
function findVariantLink( &$link, &$nt, $ignoreOtherCond = false ) {
+ # If the article has already existed, there is no need to
+ # check it again, otherwise it may cause a fault.
+ if ( $nt->exists() )
+ return;
+
global $wgDisableLangConversion, $wgDisableTitleConversion, $wgRequest, $wgUser;
$isredir = $wgRequest->getText( 'redirect', 'yes' );
$action = $wgRequest->getText( 'action' );
global $wgDisableLangConversion, $wgDisableTitleConversion, $wgRequest, $wgUser;
$isredir = $wgRequest->getText( 'redirect', 'yes' );
$action = $wgRequest->getText( 'action' );
@@
-560,7
+565,7
@@
class LanguageConverter {
|| $action == 'submit' || $linkconvert == 'no' || $wgUser->getOption('noconvertlink') == 1 ) ) )
return;
|| $action == 'submit' || $linkconvert == 'no' || $wgUser->getOption('noconvertlink') == 1 ) ) )
return;
- if
(is_object($nt)
)
+ if
( is_object( $nt )
)
$ns = $nt->getNamespace();
$variants = $this->autoConvertToAllVariants($link);
$ns = $nt->getNamespace();
$variants = $this->autoConvertToAllVariants($link);