r48640 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48639‎ | r48640 | r48641 >
Date:19:58, 20 March 2009
Author:aaron
Status:deferred
Tags:
Comment:
action/title param cleanup
Modified paths:
  • /trunk/extensions/ConfirmAccount/ConfirmAccount_body.php (modified) (history)
  • /trunk/extensions/ConfirmAccount/RequestAccount_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ConfirmAccount/RequestAccount_body.php
@@ -96,11 +96,9 @@
9797 }
9898
9999 $wgOut->addWikiText( wfMsg( "requestaccount-text" ) );
100 -
101 - $titleObj = Title::makeTitle( NS_SPECIAL, 'RequestAccount' );
102100
103101 $form = Xml::openElement( 'form', array( 'method' => 'post', 'name' => 'accountrequest',
104 - 'action' => $titleObj->getLocalUrl(), 'enctype' => 'multipart/form-data' ) );
 102+ 'action' => $this->getTitle()->getLocalUrl(), 'enctype' => 'multipart/form-data' ) );
105103 $form .= '<fieldset><legend>' . wfMsgHtml('requestaccount-leg-user') . '</legend>';
106104 $form .= wfMsgExt( 'requestaccount-acc-text', array('parse') )."\n";
107105 $form .= '<table cellpadding=\'4\'>';
@@ -210,7 +208,7 @@
211209 $form .= $captcha->getForm();
212210 $form .= '</fieldset>';
213211 }
214 - $form .= Xml::hidden( 'title', $titleObj->getPrefixedUrl() )."\n";
 212+ $form .= Xml::hidden( 'title', $this->getTitle()->getPrefixedDBKey() )."\n";
215213 $form .= Xml::hidden( 'wpEditToken', $wgUser->editToken() )."\n";
216214 $form .= Xml::hidden( 'attachment', $this->mPrevAttachment )."\n";
217215 $form .= Xml::hidden( 'forgotAttachment', $this->mForgotAttachment )."\n";
Index: trunk/extensions/ConfirmAccount/ConfirmAccount_body.php
@@ -196,7 +196,7 @@
197197 function showForm( $msg='' ) {
198198 global $wgOut, $wgUser, $wgLang, $wgAccountRequestTypes;
199199
200 - $titleObj = Title::makeTitle( NS_SPECIAL, "ConfirmAccounts/{$this->specialPageParameter}" );
 200+ $titleObj = SpecialPage::getTitleFor( 'confirmAccounts', $this->specialPageParameter );
201201
202202 $row = $this->getRequest();
203203 if( !$row || $row->acr_rejected && !$this->showRejects ) {

Status & tagging log