From a4f99d65dcb0e5e4060f981015e57b97e2278e62 Mon Sep 17 00:00:00 2001 From: Thomas Bleher Date: Mon, 17 Dec 2007 12:24:16 +0000 Subject: [PATCH] Find and fix places where globals were being used without declaring them. All the places were found using a script, reproduced below, in case anyone wants to reuse it. But beware: The script produces a lot of false positives, because it doesn't fully parse PHP and is fooled e.g. by javascript functions inside of <<setPageTitle(wfMsg('actionthrottled')); $this->setRobotPolicy( 'noindex,follow' ); diff --git a/languages/classes/LanguageKk_cyrl.php b/languages/classes/LanguageKk_cyrl.php index 2444ea08db..974326c8be 100644 --- a/languages/classes/LanguageKk_cyrl.php +++ b/languages/classes/LanguageKk_cyrl.php @@ -23,7 +23,7 @@ class LanguageKk_cyrl extends Language { } function convertGrammarKk_cyrl( $word, $case ) { - + global $wgGrammarForms; if ( isset( $wgGrammarForms['kk-kz'][$case][$word] ) ) { return $wgGrammarForms['kk-kz'][$case][$word]; } diff --git a/maintenance/addwiki.php b/maintenance/addwiki.php index 8dcd2eceb6..a19b24ce90 100644 --- a/maintenance/addwiki.php +++ b/maintenance/addwiki.php @@ -71,6 +71,7 @@ function addWiki( $lang, $site, $dbName ) } } + global $wgTitle, $wgArticle; $wgTitle = Title::newMainPage(); $wgArticle = new Article( $wgTitle ); $ucsite = ucfirst( $site ); -- 2.20.1