r67175 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67174‎ | r67175 | r67176 >
Date:23:25, 31 May 2010
Author:siebrand
Status:deferred
Tags:
Comment:
Remove unneeded checks.
Modified paths:
  • /trunk/extensions/Translate/MessageCollection.php (modified) (history)
  • /trunk/extensions/Translate/SpecialImportTranslations.php (modified) (history)
  • /trunk/extensions/Translate/SpecialLanguageStats.php (modified) (history)
  • /trunk/extensions/Translate/SpecialMagic.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslationChanges.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslationStats.php (modified) (history)
  • /trunk/extensions/Translate/SpecialTranslations.php (modified) (history)
  • /trunk/extensions/Translate/TranslateEditAddons.php (modified) (history)
  • /trunk/extensions/Translate/TranslatePage.php (modified) (history)
  • /trunk/extensions/Translate/TranslateUtils.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/TranslatePage.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Implements the core of Translate extension - a special page which shows
75 * a list of messages in a format defined by Tasks.
@@ -9,6 +7,7 @@
108 * @copyright Copyright © 2006-2007 Niklas Laxström
119 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1210 */
 11+
1312 class SpecialTranslate extends SpecialPage {
1413 const MSG = 'translate-page-';
1514
Index: trunk/extensions/Translate/MessageCollection.php
@@ -1,5 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
43 /**
54 * An extension to ease the translation of Mediawiki
65 *
Index: trunk/extensions/Translate/SpecialLanguageStats.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Implements a special page which givens translation statistics for a given
75 * set of message groups. Message group names can be entered (pipe separated)
Index: trunk/extensions/Translate/SpecialImportTranslations.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Special page to import po files exported using Translate extension.
75 *
Index: trunk/extensions/Translate/SpecialTranslationStats.php
@@ -1,8 +1,6 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
43
54 class SpecialTranslationStats extends SpecialPage {
6 -
75 public function __construct() {
86 parent::__construct( 'TranslationStats' );
97 $this->includable( true );
@@ -395,7 +393,7 @@
396394 $filters['group'] = trim( $this->opts['group'] ) !== '';
397395
398396 foreach ( $groups as $group ) {
399 -
 397+
400398 foreach ( $codes as $code ) {
401399 if ( $code !== '' ) $key = "$group ($code)";
402400 else $key = $group;
Index: trunk/extensions/Translate/SpecialTranslationChanges.php
@@ -1,9 +1,8 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Implementation of Special:TranslationChanges special page.
75 */
 6+
87 class SpecialTranslationChanges extends SpecialPage {
98 const MSG = 'translationchanges-';
109
Index: trunk/extensions/Translate/TranslateEditAddons.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Tools for edit page view to aid translators. This implements the so called
75 * old style editing, which extends the normal edit page.
@@ -10,6 +8,7 @@
119 * @copyright Copyright © 2007-2009 Niklas Laxström
1210 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1311 */
 12+
1413 class TranslateEditAddons {
1514 const MSG = 'translate-edit-';
1615
@@ -339,4 +338,3 @@
340339 }
341340
342341 }
343 -
Index: trunk/extensions/Translate/TranslateUtils.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * This class contains some static helper functions for other classes.
75 *
@@ -8,6 +6,7 @@
97 * @copyright Copyright © 2007, 2009 Niklas Laxström
108 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
119 */
 10+
1211 class TranslateUtils {
1312 const MSG = 'translate-';
1413
Index: trunk/extensions/Translate/SpecialMagic.php
@@ -1,10 +1,9 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * This special page helps with the translations of MediaWiki features that are
75 * not in the main messages array.
86 */
 7+
98 class SpecialMagic extends SpecialPage {
109 /** Message prefix for translations */
1110 const MSG = 'translate-magic-';
Index: trunk/extensions/Translate/SpecialTranslations.php
@@ -1,6 +1,4 @@
22 <?php
3 -if ( !defined( 'MEDIAWIKI' ) ) die();
4 -
53 /**
64 * Implements a special page which shows all translations for a message.
75 * Bits taken from SpecialPrefixindex.php and TranslateTasks.php
@@ -11,6 +9,7 @@
1210 * @copyright Copyright © 2009 Niklas Laxström
1311 * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 2.0 or later
1412 */
 13+
1514 class SpecialTranslations extends SpecialAllpages {
1615 function __construct() {
1716 parent::__construct( 'Translations' );

Status & tagging log