r98588 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r98587‎ | r98588 | r98589 >
Date:00:13, 1 October 2011
Author:aaron
Status:deferred
Tags:
Comment:
* Added missing AddNewAccount hook param
* Cleaned up unused vars per PHPStorm
Modified paths:
  • /trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/presentation/specialpages/actions/UserCredentials_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php
@@ -58,7 +58,7 @@
5959 }
6060
6161 // FIXME: don't just take on to general site notice
62 - public static function confirmAccountsNotice( $notice ) {
 62+ public static function confirmAccountsNotice( &$notice ) {
6363 global $wgConfirmAccountNotice, $wgUser, $wgMemc, $wgOut;
6464 if ( !$wgConfirmAccountNotice || !$wgUser->isAllowed( 'confirmaccount' ) ) {
6565 return true;
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/UserCredentials_body.php
@@ -7,7 +7,6 @@
88 }
99
1010 function execute( $par ) {
11 - global $wgAccountRequestTypes;
1211 $out = $this->getOutput();
1312 $request = $this->getRequest();
1413 $reqUser = $this->getUser();
@@ -56,7 +55,6 @@
5756 }
5857
5958 function showCredentials() {
60 - global $wgLang, $wgAccountRequestTypes;
6159 $reqUser = $this->getUser();
6260 $out = $this->getOutput();
6361
@@ -162,7 +160,6 @@
163161 }
164162
165163 if ( $reqUser->isAllowed( 'requestips' ) ) {
166 - $blokip = SpecialPage::getTitleFor( 'blockip' );
167164 $form .= "<p>" . wfMsgHtml( 'usercredentials-ip' ) . " " . htmlspecialchars( $row->acd_ip ) . "</p>\n";
168165 }
169166 $form .= '</fieldset>';
@@ -189,7 +186,7 @@
190187 * @return void
191188 */
192189 function showFile( $key ) {
193 - global $wgConfirmAccountFSRepos, $IP;
 190+ global $wgConfirmAccountFSRepos;
194191 $out = $this->getOutput();
195192 $request = $this->getRequest();
196193
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/RequestAccount_body.php
@@ -223,9 +223,6 @@
224224 }
225225
226226 protected function doSubmit() {
227 - global $wgAuth, $wgAccountRequestThrottle;
228 - $out = $this->getOutput();
229 -
230227 # Now create a dummy user ($u) and check if it is valid
231228 $name = trim( $this->mUsername );
232229 $u = User::newFromName( $name, 'creatable' );
Index: trunk/extensions/ConfirmAccount/presentation/specialpages/actions/ConfirmAccount_body.php
@@ -381,7 +381,7 @@
382382 * @param $key string
383383 */
384384 protected function showFile( $key ) {
385 - global $wgConfirmAccountFSRepos, $IP;
 385+ global $wgConfirmAccountFSRepos;
386386 $out = $this->getOutput();
387387 $request = $this->getRequest();
388388
@@ -607,7 +607,7 @@
608608 }
609609
610610 # Safe to hook/log now...
611 - wfRunHooks( 'AddNewAccount', array( $user ) );
 611+ wfRunHooks( 'AddNewAccount', array( $user, false /* not by email */ ) );
612612 $user->addNewUserLogEntry();
613613
614614 # Clear cache for notice of how many account requests there are
@@ -641,7 +641,7 @@
642642 $areas = explode("\n*","\n".wfMsg('requestaccount-areas'));
643643 foreach( $areas as $n => $line ) {
644644 $set = explode("|",$line);
645 - $name = str_replace("_"," ",$set[0]);
 645+ //$name = str_replace("_"," ",$set[0]);
646646 if( in_array($set[0],$this->mAreaSet) ) {
647647 # General userpage text for anyone with this interest
648648 if( isset($set[2]) ) {
@@ -834,12 +834,8 @@
835835 }
836836
837837 protected function showList() {
838 - global $wgLang;
839 - $reqUser = $this->getUser();
840838 $out = $this->getOutput();
841839
842 - $titleObj = SpecialPage::getTitleFor( 'ConfirmAccounts', $this->specialPageParameter );
843 -
844840 # Output the list
845841 $pager = new ConfirmAccountsPager( $this, array(),
846842 $this->queueType, $this->showRejects, $this->showHeld, $this->showStale );
@@ -875,7 +871,6 @@
876872
877873 public function formatRow( $row ) {
878874 global $wgLang, $wgUseRealNamesOnly, $wgAllowRealName;
879 - $reqUser = $this->getUser();
880875
881876 $titleObj = SpecialPage::getTitleFor( 'ConfirmAccounts', $this->specialPageParameter );
882877 if( $this->showRejects || $this->showStale ) {
@@ -976,7 +971,6 @@
977972 }
978973
979974 function formatRow( $row ) {
980 - $block = new Block;
981975 return $this->mForm->formatRow( $row );
982976 }
983977

Status & tagging log