r69893 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r69892‎ | r69893 | r69894 >
Date:19:22, 25 July 2010
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Add a couple of missing globals

self:: to $this

Remove an unused
Modified paths:
  • /trunk/extensions/Translate/FFS.php (modified) (history)
  • /trunk/extensions/Translate/MessageGroups.php (modified) (history)
  • /trunk/extensions/Translate/SpecialLanguageStats.php (modified) (history)
  • /trunk/extensions/Translate/ffs/Wiki.php (modified) (history)
  • /trunk/extensions/Translate/spyc/spyc.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/SpecialLanguageStats.php
@@ -195,7 +195,7 @@
196196 foreach ( $groups as $groupName => $g ) {
197197 // Do not report if this group is blacklisted.
198198 $groupId = $g->getId();
199 - $blacklisted = self::isBlacklisted( $groupId, $code );
 199+ $blacklisted = $this->isBlacklisted( $groupId, $code );
200200
201201 if ( $blacklisted !== null ) {
202202 continue;
Index: trunk/extensions/Translate/FFS.php
@@ -815,7 +815,7 @@
816816 $match = null;
817817
818818 while ( preg_match( $regex, $message, $match ) ) {
819 - $uniqkey = self::placeholder();
 819+ $uniqkey = $this->placeholder();
820820 $placeholders[$uniqkey] = $match[0];
821821 $message = preg_replace( $regex, $uniqkey, $message );
822822 }
@@ -826,7 +826,7 @@
827827 $match = null;
828828
829829 while ( preg_match( $regex, $message, $match ) ) {
830 - $uniqkey = self::placeholder();
 830+ $uniqkey = $this->placeholder();
831831 $matches[$uniqkey] = $match;
832832 $message = preg_replace( $regex, $uniqkey, $message );
833833 }
Index: trunk/extensions/Translate/MessageGroups.php
@@ -303,6 +303,8 @@
304304 }
305305
306306 public function getBools() {
 307+ global $wgOptionalMessages, $wgIgnoredMessages;
 308+
307309 require( $this->getMetaDataPrefix() . '/messageTypes.inc' );
308310
309311 return array(
Index: trunk/extensions/Translate/ffs/Wiki.php
@@ -116,6 +116,8 @@
117117
118118 require( $dir . '/messages.inc' );
119119
 120+ global $wgMessageStructure, $wgBlockComments;
 121+
120122 # Sort messages to blocks
121123 $sortedMessages['unknown'] = $messages;
122124 foreach ( $wgMessageStructure as $blockName => $block ) {
Index: trunk/extensions/Translate/spyc/spyc.php
@@ -481,8 +481,6 @@
482482 $line = trim( $line );
483483 if ( !$line ) return array();
484484
485 - $array = array();
486 -
487485 $group = $this->nodeContainsGroup( $line );
488486 if ( $group ) {
489487 $this->addGroup( $line, $group );

Follow-up revisions

RevisionCommit summaryAuthorDate
r69979Revert part of r69893, not really globalsnikerabbit22:17, 26 July 2010

Comments

#Comment by Nikerabbit (talk | contribs)   09:39, 26 July 2010

See my comments at r69882.

Status & tagging log