X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=56e9b44cc59c3e91e9ce0b44708931f726a06ec0;hb=99c92a87fc32fb897da320dd12b391a0d9be12c7;hp=cdbebf188bf88bfeb87f90f80fba17c4e3c1a74e;hpb=ed60efc8eb3126e97c0098681bd9239faecf33c1;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index cdbebf188b..56e9b44cc5 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -3165,7 +3165,7 @@ class Title { return false; } - if ( false !== strpos( $dbkey, UTF8_REPLACEMENT ) ) { + if ( strpos( $dbkey, UTF8_REPLACEMENT ) !== false ) { # Contained illegal UTF-8 sequences or forbidden Unicode chars. return false; } @@ -3302,6 +3302,7 @@ class Title { # Can't make a link to a namespace alone... "empty" local links can only be # self-links with a fragment identifier. + # TODO: Why do we exclude NS_MAIN (bug 54044) if ( $dbkey == '' && $this->mInterwiki == '' && $this->mNamespace != NS_MAIN ) { return false; } @@ -3840,7 +3841,8 @@ class Title { if ( $createRedirect ) { $contentHandler = ContentHandler::getForTitle( $this ); - $redirectContent = $contentHandler->makeRedirectContent( $nt ); + $redirectContent = $contentHandler->makeRedirectContent( $nt, + wfMessage( 'move-redirect-text' )->inContentLanguage()->plain() ); // NOTE: If this page's content model does not support redirects, $redirectContent will be null. } else {