r113548 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113547‎ | r113548 | r113549 >
Date:23:33, 9 March 2012
Author:reedy
Status:ok
Tags:
Comment:
Documentation, spaces, braces, explicit member variables
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php (modified) (history)
  • /trunk/phase3/includes/installer/Installer.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialVersion.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/installer/Installer.php
@@ -1094,12 +1094,16 @@
10951095 if( $utf8 ) {
10961096 $useNormalizer = 'utf8';
10971097 $utf8 = utf8_normalize( $not_normal_c, UtfNormal::UNORM_NFC );
1098 - if ( $utf8 !== $normal_c ) $needsUpdate = true;
 1098+ if ( $utf8 !== $normal_c ) {
 1099+ $needsUpdate = true;
 1100+ }
10991101 }
11001102 if( $intl ) {
11011103 $useNormalizer = 'intl';
11021104 $intl = normalizer_normalize( $not_normal_c, Normalizer::FORM_C );
1103 - if ( $intl !== $normal_c ) $needsUpdate = true;
 1105+ if ( $intl !== $normal_c ) {
 1106+ $needsUpdate = true;
 1107+ }
11041108 }
11051109
11061110 // Uses messages 'config-unicode-using-php', 'config-unicode-using-utf8', 'config-unicode-using-intl'
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -220,6 +220,7 @@
221221 }
222222 $nt = $userObj->getUserPage();
223223 $talk = $userObj->getTalkPage();
 224+ $links = '';
224225 if ( $talk ) {
225226 $tools = $this->getUserLinks( $nt, $talk, $userObj );
226227 $links = $this->getLanguage()->pipeList( $tools );
@@ -545,6 +546,11 @@
546547 var $namespace = '', $mDb;
547548 var $preventClickjacking = false;
548549
 550+ /**
 551+ * @var array
 552+ */
 553+ protected $mParentLens;
 554+
549555 function __construct( IContextSource $context, array $options ) {
550556 parent::__construct( $context );
551557
@@ -709,6 +715,7 @@
710716
711717 /**
712718 * Do a batched query to get the parent revision lengths
 719+ * @param $revIds array
713720 * @return array
714721 */
715722 private function getParentLengths( array $revIds ) {
@@ -751,6 +758,7 @@
752759 * was not written by the target user.
753760 *
754761 * @todo This would probably look a lot nicer in a table.
 762+ * @param $row
755763 * @return string
756764 */
757765 function formatRow( $row ) {
@@ -902,6 +910,9 @@
903911 $this->preventClickjacking = true;
904912 }
905913
 914+ /**
 915+ * @return bool
 916+ */
906917 public function getPreventClickjacking() {
907918 return $this->preventClickjacking;
908919 }
Index: trunk/phase3/includes/specials/SpecialVersion.php
@@ -725,7 +725,7 @@
726726 }
727727
728728 preg_match( "/ref: (.*)/",
729 - file_get_contents( $HEADfile), $m );
 729+ file_get_contents( $HEADfile ), $m );
730730
731731 $REFfile = "{$BASEDIR}{$m[1]}";
732732 if( !file_exists( $REFfile ) ) {
Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -119,10 +119,10 @@
120120 global $wgCentralNoticeLoader, $wgSpecialPageGroups;
121121
122122 $dir = dirname( __FILE__ ) . '/';
123 -
 123+
124124 // Update the database schema if necessary
125125 $wgHooks['LoadExtensionSchemaUpdates'][] = 'efCentralNoticeSchema';
126 -
 126+
127127 // If CentralNotice banners should be shown on this wiki, load the components we need for
128128 // showing banners. For discussion of banner loading strategies, see
129129 // http://wikitech.wikimedia.org/view/CentralNotice/Optimizing_banner_loading
Index: trunk/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.class.php
@@ -9,6 +9,7 @@
1010
1111 /**
1212 * List of languages available to GeSHi
 13+ * @var array
1314 */
1415 private static $languages = null;
1516
@@ -287,7 +288,6 @@
288289 * @return string
289290 */
290291 public static function buildHeadItem( $geshi ) {
291 - global $wgUseSiteCss, $wgSquidMaxage;
292292 $lang = $geshi->language;
293293 $css = array();
294294 $css[] = '<style type="text/css">/*<![CDATA[*/';

Status & tagging log