r112018 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112017‎ | r112018 | r112019 >
Date:16:19, 21 February 2012
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Followup r111997

Remove unused $wgScript

Fix missing brackets on the getUser() call

Fix stuff and dbname typos

$this->mGlobalUser isn't defined, use the $globalUser defined above
Modified paths:
  • /trunk/extensions/Translate/lcadft/SpecialTranslatorSignup.php (modified) (history)
  • /trunk/extensions/Translate/utils/StatsTable.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/lcadft/SpecialTranslatorSignup.php
@@ -46,7 +46,7 @@
4747 );
4848 }
4949 public function getDataModel() {
50 - global $wgLCADFTContactMethods, $wgScript;
 50+ global $wgLCADFTContactMethods;
5151
5252 $m['username'] = array(
5353 'type' => 'info',
@@ -129,18 +129,18 @@
130130 }
131131
132132 protected function getOtherWikis() {
133 - $wikis = array();
134133 if ( !class_exists( 'CentralAuthUser' ) ) {
135134 return array();
136135 }
137 - $globalUser = new CentralAuthUser( $this->getUser->getName() );
 136+ $globalUser = new CentralAuthUser( $this->getUser()->getName() );
138137 if ( !$globalUser->exists() ) {
139138 return array();
140139 }
141140
142 - $stuff = $this->mGlobalUser->queryAttached();
143 - foreach ( $suff as $dbname => $value ) {
144 - $wikis[] = $dname;
 141+ $wikis = array();
 142+ $stuff = $globalUser->queryAttached();
 143+ foreach ( $stuff as $dbname => $value ) {
 144+ $wikis[] = $dbname;
145145 }
146146
147147 return array_combine( $wikis, $wikis );
Index: trunk/extensions/Translate/utils/StatsTable.php
@@ -156,8 +156,8 @@
157157 /**
158158 * Makes partial row from completion numbers
159159 * @param $fuzzy int Number of fuzzy translations
160 - * @param $translated in Number of non-fuzzy translations
161 - * @param $total Total number of messages in this group
 160+ * @param $translated int Number of non-fuzzy translations
 161+ * @param $total int Total number of messages in this group
162162 * @return string Html
163163 */
164164 public function makeNumberColumns( $fuzzy, $translated, $total ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111997Committing this from git so that Siebrand can review it using CR tool.nikerabbit09:59, 21 February 2012

Comments

#Comment by Nikerabbit (talk | contribs)   16:25, 21 February 2012

Anyway I can test that code easily?

#Comment by Reedy (talk | contribs)   16:27, 21 February 2012

Your best bet is probably to use testwiki for things like this. Then if you need to put some debugging in for it, you can do var_dump(); die();

Status & tagging log