r71511 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71510‎ | r71511 | r71512 >
Date:21:33, 23 August 2010
Author:platonides
Status:ok (Comments)
Tags:
Comment:
Follow up r70917. Having $wgCapitalLinks = false; was what caused the errors.
Modified paths:
  • /trunk/phase3/maintenance/parserTests.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/parserTests.inc
@@ -1029,6 +1029,10 @@
10301030 * @param $line Integer: the input line number, for reporting errors
10311031 */
10321032 public function addArticle( $name, $text, $line ) {
 1033+ global $wgCapitalLinks;
 1034+ $oldCapitalLinks = $wgCapitalLinks;
 1035+ $wgCapitalLinks = true; // We only need this from SetupGlobals() See r70917#c8637
 1036+
10331037 $title = Title::newFromText( $name );
10341038 if ( is_null( $title ) ) {
10351039 wfDie( "invalid title at line $line\n" );
@@ -1041,6 +1045,8 @@
10421046
10431047 $art = new Article( $title );
10441048 $art->insertNewArticle( $text, '', false, false );
 1049+
 1050+ $wgCapitalLinks = $oldCapitalLinks;
10451051 }
10461052
10471053 /**

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r70917Force $wgContLang to English at the entry point....platonides21:23, 11 August 2010

Comments

#Comment by Danwe (talk | contribs)   18:19, 17 August 2012

This prevents from creating articles with lower case letters for testing.

#Comment by Platonides (talk | contribs)   18:36, 17 August 2012

See r70917 for the errors that were caused by running without $wgCapitalLinks: http://pastebin.com/KFhTxkUD

The variable should be set to any of the two values at the entry point.

Status & tagging log