r87608 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87607‎ | r87608 | r87609 >
Date:23:50, 6 May 2011
Author:reedy
Status:deferred
Tags:
Comment:
Unused globals and daft versioning things
Modified paths:
  • /trunk/extensions/Crosswiki/Block/CrosswikiBlock.page.php (modified) (history)
  • /trunk/extensions/FCKeditor/FCKeditorParser.body.php (modified) (history)
  • /trunk/extensions/GetFamily/GetFamily.php (modified) (history)
  • /trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php (modified) (history)
  • /trunk/extensions/NSFileRepo/NSFileRepo.php (modified) (history)
  • /trunk/extensions/SmoothGallery/SmoothGalleryClass.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SmoothGallery/SmoothGalleryClass.php
@@ -178,8 +178,6 @@
179179 }
180180
181181 function renderPlainGallery ( $galleryArray ) {
182 - global $wgVersion;
183 -
184182 if ( !isset( $galleryArray["images"] ) ) {
185183 return '';
186184 }
Index: trunk/extensions/NSFileRepo/NSFileRepo.php
@@ -64,7 +64,7 @@
6565 * Initial setup, add .i18n. messages from $IP/extensions/DiscussionThreading/DiscussionThreading.i18n.php
6666 */
6767 function NSFileRepoSetup() {
68 - global $wgLocalFileRepo, $wgVersion;
 68+ global $wgLocalFileRepo;
6969 $wgLocalFileRepo['class'] = "NSLocalRepo";
7070 RepoGroup::destroySingleton();
7171 }
Index: trunk/extensions/GetFamily/GetFamily.php
@@ -188,9 +188,6 @@
189189 }
190190 $out .= " }\n \n";
191191 }
192 - $version = array();
193 - preg_match( '/[0-9]*\.[0-9]*/', $wgVersion, $version );
194 - $version = $version[0];
195192
196193 $out .= "
197194 def hostname(self, code):
@@ -211,7 +208,7 @@
212209 return '%s?title=%s:Userlogin&action=submitlogin' % (self.path(code), self.special_namespace_url(code))
213210
214211 def version(self, code):
215 - return '" . $version . "' # The MediaWiki version used. Not very important in most cases.
 212+ return '" . $wgVersion . "' # The MediaWiki version used. Not very important in most cases.
216213 ";
217214 } else {
218215 $out .= wfMsg( 'getfamily-interwikierror' );
Index: trunk/extensions/Crosswiki/Block/CrosswikiBlock.page.php
@@ -262,12 +262,9 @@
263263 * @param mixed $par Parameter passed to the page
264264 */
265265 public function execute( $par ) {
266 - global $wgOut, $wgUser, $wgRequest, $wgContLang, $wgLang;
267 - global $wgVersion, $wgMaxNameChars, $wgCapitalLinks;
 266+ global $wgOut, $wgUser, $wgRequest;
268267
269268 # Add messages
270 -
271 -
272269 $this->setHeaders();
273270
274271 if ( !$wgUser->isAllowed( 'crosswikiblock' ) ) {
Index: trunk/extensions/MetavidWiki/includes/MV_GlobalFunctions.php
@@ -53,11 +53,8 @@
5454 return true;
5555 }
5656 function mvSetupExtension() {
57 - global $mvVersion, $mvNamespace, $mvgIP, $wgHooks, $wgExtensionCredits, $mvMasterStore,
58 - $wgParser, $mvArticlePath, $mvgScriptPath, $wgServer, $markerList, $wgVersion,
59 - $wgAjaxExportList, $mvEnableAutoComplete, $mvEnableJSMVDrewrite,
60 - $wgAutoloadClasses, $wgSpecialPages, $wgMediaHandlers, $wgJSAutoloadClasses,
61 - $wgAPIModules;
 57+ global $mvgIP, $wgHooks, $wgExtensionCredits, $wgParser,
 58+ $wgAjaxExportList, $wgAutoloadClasses, $wgSpecialPages, $wgMediaHandlers;
6259
6360
6461 //add the ALL page header
Index: trunk/extensions/FCKeditor/FCKeditorParser.body.php
@@ -147,7 +147,7 @@
148148 * @private
149149 */
150150 function strip( $text, $state, $stripcomments = false, $dontstrip = array() ) {
151 - global $wgContLang, $wgUseTeX, $wgScriptPath, $wgVersion, $wgHooks, $wgExtensionFunctions;
 151+ global $wgContLang, $wgUseTeX, $wgScriptPath, $wgHooks, $wgExtensionFunctions;
152152
153153 wfProfileIn( __METHOD__ );
154154 $render = ( $this->mOutputType == OT_HTML );

Status & tagging log