Index: trunk/phase3/includes/User.php |
— | — | @@ -3199,7 +3199,7 @@ |
3200 | 3200 | * @param $request WebRequest object to use or null to use $wgRequest |
3201 | 3201 | * @return String The new edit token |
3202 | 3202 | */ |
3203 | | - public function editToken( $salt = '', $request = null ) { |
| 3203 | + public function editToken( $salt = '', $request = null ) { |
3204 | 3204 | return $this->getEditToken( $salt, $request ); |
3205 | 3205 | } |
3206 | 3206 | |
— | — | @@ -3258,7 +3258,7 @@ |
3259 | 3259 | * @return Boolean: Whether the token matches |
3260 | 3260 | */ |
3261 | 3261 | public function matchEditToken( $val, $salt = '', $request = null ) { |
3262 | | - $sessionToken = $this->editToken( $salt, $request ); |
| 3262 | + $sessionToken = $this->getEditToken( $salt, $request ); |
3263 | 3263 | if ( $val != $sessionToken ) { |
3264 | 3264 | wfDebug( "User::matchEditToken: broken session data\n" ); |
3265 | 3265 | } |
— | — | @@ -3275,7 +3275,7 @@ |
3276 | 3276 | * @return Boolean: Whether the token matches |
3277 | 3277 | */ |
3278 | 3278 | public function matchEditTokenNoSuffix( $val, $salt = '', $request = null ) { |
3279 | | - $sessionToken = $this->editToken( $salt, $request ); |
| 3279 | + $sessionToken = $this->getEditToken( $salt, $request ); |
3280 | 3280 | return substr( $sessionToken, 0, 32 ) == substr( $val, 0, 32 ); |
3281 | 3281 | } |
3282 | 3282 | |
Index: trunk/phase3/includes/diff/DifferenceEngine.php |
— | — | @@ -435,7 +435,7 @@ |
436 | 436 | // Build the link |
437 | 437 | if ( $rcid ) { |
438 | 438 | $this->getOutput()->preventClickjacking(); |
439 | | - $token = $this->getUser()->editToken( $rcid ); |
| 439 | + $token = $this->getUser()->getEditToken( $rcid ); |
440 | 440 | $this->mMarkPatrolledLink = ' <span class="patrollink">[' . Linker::linkKnown( |
441 | 441 | $this->mNewPage, |
442 | 442 | $this->msg( 'markaspatrolleddiff' )->escaped(), |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -873,7 +873,7 @@ |
874 | 874 | return; |
875 | 875 | } |
876 | 876 | |
877 | | - $token = $wgUser->editToken( $rcid ); |
| 877 | + $token = $wgUser->getEditToken( $rcid ); |
878 | 878 | $wgOut->preventClickjacking(); |
879 | 879 | |
880 | 880 | $wgOut->addHTML( |
— | — | @@ -1287,7 +1287,7 @@ |
1288 | 1288 | |
1289 | 1289 | if ( $this->getContext()->getUser()->isAllowed( 'trackback' ) ) { |
1290 | 1290 | $delurl = $this->getTitle()->getFullURL( "action=deletetrackback&tbid=" . |
1291 | | - $o->tb_id . "&token=" . urlencode( $this->getContext()->getUser()->editToken() ) ); |
| 1291 | + $o->tb_id . "&token=" . urlencode( $this->getContext()->getUser()->getEditToken() ) ); |
1292 | 1292 | $rmvtxt = wfMsg( 'trackbackremove', htmlspecialchars( $delurl ) ); |
1293 | 1293 | } |
1294 | 1294 | |
— | — | @@ -1524,7 +1524,7 @@ |
1525 | 1525 | </tr>" . |
1526 | 1526 | Xml::closeElement( 'table' ) . |
1527 | 1527 | Xml::closeElement( 'fieldset' ) . |
1528 | | - Html::hidden( 'wpEditToken', $user->editToken( array( 'delete', $this->getTitle()->getPrefixedText() ) ) ) . |
| 1528 | + Html::hidden( 'wpEditToken', $user->getEditToken( array( 'delete', $this->getTitle()->getPrefixedText() ) ) ) . |
1529 | 1529 | Xml::closeElement( 'form' ); |
1530 | 1530 | |
1531 | 1531 | if ( $user->isAllowed( 'editinterface' ) ) { |
Index: trunk/phase3/includes/ImagePage.php |
— | — | @@ -988,7 +988,7 @@ |
989 | 989 | array( |
990 | 990 | 'action' => 'revert', |
991 | 991 | 'oldimage' => $img, |
992 | | - 'wpEditToken' => $wgUser->editToken( $img ) |
| 992 | + 'wpEditToken' => $wgUser->getEditToken( $img ) |
993 | 993 | ), |
994 | 994 | array( 'known', 'noclasses' ) |
995 | 995 | ); |
— | — | @@ -1016,7 +1016,7 @@ |
1017 | 1017 | array( |
1018 | 1018 | 'target' => $this->title->getPrefixedText(), |
1019 | 1019 | 'file' => $img, |
1020 | | - 'token' => $wgUser->editToken( $img ) |
| 1020 | + 'token' => $wgUser->getEditToken( $img ) |
1021 | 1021 | ), |
1022 | 1022 | array( 'known', 'noclasses' ) |
1023 | 1023 | ); |
Index: trunk/phase3/includes/Linker.php |
— | — | @@ -1581,7 +1581,7 @@ |
1582 | 1582 | $query = array( |
1583 | 1583 | 'action' => 'rollback', |
1584 | 1584 | 'from' => $rev->getUserText(), |
1585 | | - 'token' => $wgUser->editToken( array( $title->getPrefixedText(), $rev->getUserText() ) ), |
| 1585 | + 'token' => $wgUser->getEditToken( array( $title->getPrefixedText(), $rev->getUserText() ) ), |
1586 | 1586 | ); |
1587 | 1587 | if ( $wgRequest->getBool( 'bot' ) ) { |
1588 | 1588 | $query['bot'] = '1'; |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1955,7 +1955,7 @@ |
1956 | 1956 | * include the constant suffix to prevent editing from |
1957 | 1957 | * broken text-mangling proxies. |
1958 | 1958 | */ |
1959 | | - $wgOut->addHTML( "\n" . Html::hidden( "wpEditToken", $wgUser->editToken() ) . "\n" ); |
| 1959 | + $wgOut->addHTML( "\n" . Html::hidden( "wpEditToken", $wgUser->getEditToken() ) . "\n" ); |
1960 | 1960 | } |
1961 | 1961 | |
1962 | 1962 | /** |
Index: trunk/phase3/includes/HTMLForm.php |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | |
495 | 495 | $html = ''; |
496 | 496 | if( $this->getMethod() == 'post' ){ |
497 | | - $html .= Html::hidden( 'wpEditToken', $this->getUser()->editToken(), array( 'id' => 'wpEditToken' ) ) . "\n"; |
| 497 | + $html .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken(), array( 'id' => 'wpEditToken' ) ) . "\n"; |
498 | 498 | $html .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . "\n"; |
499 | 499 | } |
500 | 500 | |
Index: trunk/phase3/includes/revisiondelete/RevisionDelete.php |
— | — | @@ -584,7 +584,7 @@ |
585 | 585 | array( |
586 | 586 | 'target' => $this->list->title->getPrefixedText(), |
587 | 587 | 'file' => $this->file->getArchiveName(), |
588 | | - 'token' => $this->list->getUser()->editToken( |
| 588 | + 'token' => $this->list->getUser()->getEditToken( |
589 | 589 | $this->file->getArchiveName() ) |
590 | 590 | ) |
591 | 591 | ); |
— | — | @@ -733,7 +733,7 @@ |
734 | 734 | array( |
735 | 735 | 'target' => $this->list->title->getPrefixedText(), |
736 | 736 | 'file' => $key, |
737 | | - 'token' => $this->list->getUser()->editToken( $key ) |
| 737 | + 'token' => $this->list->getUser()->getEditToken( $key ) |
738 | 738 | ) |
739 | 739 | ); |
740 | 740 | } |
Index: trunk/phase3/includes/actions/WatchAction.php |
— | — | @@ -123,7 +123,7 @@ |
124 | 124 | |
125 | 125 | // This token stronger salted and not compatible with ApiWatch |
126 | 126 | // It's title/action specific because index.php is GET and API is POST |
127 | | - return $user->editToken( $salt ); |
| 127 | + return $user->getEditToken( $salt ); |
128 | 128 | } |
129 | 129 | |
130 | 130 | /** |
Index: trunk/phase3/includes/resourceloader/ResourceLoaderUserTokensModule.php |
— | — | @@ -40,7 +40,7 @@ |
41 | 41 | global $wgUser; |
42 | 42 | |
43 | 43 | return array( |
44 | | - 'editToken' => $wgUser->edittoken(), |
| 44 | + 'editToken' => $wgUser->getEditToken(), |
45 | 45 | 'watchToken' => ApiQueryInfo::getWatchToken(null, null), |
46 | 46 | ); |
47 | 47 | } |
Index: trunk/phase3/includes/FileDeleteForm.php |
— | — | @@ -194,7 +194,7 @@ |
195 | 195 | 'id' => 'mw-img-deleteconfirm' ) ) . |
196 | 196 | Xml::openElement( 'fieldset' ) . |
197 | 197 | Xml::element( 'legend', null, wfMsg( 'filedelete-legend' ) ) . |
198 | | - Html::hidden( 'wpEditToken', $wgUser->editToken( $this->oldimage ) ) . |
| 198 | + Html::hidden( 'wpEditToken', $wgUser->getEditToken( $this->oldimage ) ) . |
199 | 199 | $this->prepareMessage( 'filedelete-intro' ) . |
200 | 200 | Xml::openElement( 'table', array( 'id' => 'mw-img-deleteconfirm-table' ) ) . |
201 | 201 | "<tr> |
Index: trunk/phase3/includes/specials/SpecialUserrights.php |
— | — | @@ -439,7 +439,7 @@ |
440 | 440 | $this->getOutput()->addHTML( |
441 | 441 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . |
442 | 442 | Html::hidden( 'user', $this->mTarget ) . |
443 | | - Html::hidden( 'wpEditToken', $this->getUser()->editToken( $this->mTarget ) ) . |
| 443 | + Html::hidden( 'wpEditToken', $this->getUser()->getEditToken( $this->mTarget ) ) . |
444 | 444 | Xml::openElement( 'fieldset' ) . |
445 | 445 | Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) . |
446 | 446 | wfMessage( 'editinguser' )->params( wfEscapeWikiText( $user->getName() ) )->rawParams( $userToolLinks )->parse() . |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -862,7 +862,7 @@ |
863 | 863 | Xml::element( 'input', array( |
864 | 864 | 'type' => 'hidden', |
865 | 865 | 'name' => 'wpEditToken', |
866 | | - 'value' => $user->editToken() ) ) . |
| 866 | + 'value' => $user->getEditToken() ) ) . |
867 | 867 | Xml::element( 'input', array( |
868 | 868 | 'type' => 'submit', |
869 | 869 | 'name' => 'preview', |
— | — | @@ -968,7 +968,7 @@ |
969 | 969 | 'action' => $this->getTitle()->getLocalURL( |
970 | 970 | 'target=' . urlencode( $this->mTarget ) . |
971 | 971 | '&file=' . urlencode( $key ) . |
972 | | - '&token=' . urlencode( $this->getUser()->editToken( $key ) ) ) |
| 972 | + '&token=' . urlencode( $this->getUser()->getEditToken( $key ) ) ) |
973 | 973 | ) |
974 | 974 | ) . |
975 | 975 | Xml::submitButton( wfMsg( 'undelete-show-file-submit' ) ) . |
— | — | @@ -1143,7 +1143,7 @@ |
1144 | 1144 | if ( $this->mAllowed ) { |
1145 | 1145 | # Slip in the hidden controls here |
1146 | 1146 | $misc = Html::hidden( 'target', $this->mTarget ); |
1147 | | - $misc .= Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 1147 | + $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
1148 | 1148 | $misc .= Xml::closeElement( 'form' ); |
1149 | 1149 | $out->addHTML( $misc ); |
1150 | 1150 | } |
— | — | @@ -1301,7 +1301,7 @@ |
1302 | 1302 | array( |
1303 | 1303 | 'target' => $this->mTargetObj->getPrefixedText(), |
1304 | 1304 | 'file' => $key, |
1305 | | - 'token' => $this->getUser()->editToken( $key ) |
| 1305 | + 'token' => $this->getUser()->getEditToken( $key ) |
1306 | 1306 | ) |
1307 | 1307 | ); |
1308 | 1308 | if( $file->isDeleted( File::DELETED_FILE ) ) { |
Index: trunk/phase3/includes/specials/SpecialImport.php |
— | — | @@ -210,7 +210,7 @@ |
211 | 211 | "</td> |
212 | 212 | </tr>" . |
213 | 213 | Xml::closeElement( 'table' ). |
214 | | - Html::hidden( 'editToken', $user->editToken() ) . |
| 214 | + Html::hidden( 'editToken', $user->getEditToken() ) . |
215 | 215 | Xml::closeElement( 'form' ) . |
216 | 216 | Xml::closeElement( 'fieldset' ) |
217 | 217 | ); |
— | — | @@ -240,7 +240,7 @@ |
241 | 241 | wfMsgExt( 'import-interwiki-text', array( 'parse' ) ) . |
242 | 242 | Html::hidden( 'action', 'submit' ) . |
243 | 243 | Html::hidden( 'source', 'interwiki' ) . |
244 | | - Html::hidden( 'editToken', $user->editToken() ) . |
| 244 | + Html::hidden( 'editToken', $user->getEditToken() ) . |
245 | 245 | Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) . |
246 | 246 | "<tr> |
247 | 247 | <td class='mw-label'>" . |
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
— | — | @@ -294,7 +294,7 @@ |
295 | 295 | 'action' => $this->getTitle()->getLocalUrl( |
296 | 296 | 'target=' . urlencode( $oimage->getName() ) . |
297 | 297 | '&file=' . urlencode( $archiveName ) . |
298 | | - '&token=' . urlencode( $this->getUser()->editToken( $archiveName ) ) ) |
| 298 | + '&token=' . urlencode( $this->getUser()->getEditToken( $archiveName ) ) ) |
299 | 299 | ) |
300 | 300 | ) . |
301 | 301 | Xml::submitButton( wfMsg( 'revdelete-show-file-submit' ) ) . |
— | — | @@ -404,7 +404,7 @@ |
405 | 405 | '</td>' . |
406 | 406 | "</tr>\n" . |
407 | 407 | Xml::closeElement( 'table' ) . |
408 | | - Html::hidden( 'wpEditToken', $this->getUser()->editToken() ) . |
| 408 | + Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ) . |
409 | 409 | Html::hidden( 'target', $this->targetObj->getPrefixedText() ) . |
410 | 410 | Html::hidden( 'type', $this->typeName ) . |
411 | 411 | Html::hidden( 'ids', implode( ',', $this->ids ) ) . |
Index: trunk/phase3/includes/specials/SpecialChangeEmail.php |
— | — | @@ -118,7 +118,7 @@ |
119 | 119 | 'method' => 'post', |
120 | 120 | 'action' => $this->getTitle()->getLocalUrl(), |
121 | 121 | 'id' => 'mw-changeemail-form' ) ) . "\n" . |
122 | | - Html::hidden( 'token', $user->editToken() ) . "\n" . |
| 122 | + Html::hidden( 'token', $user->getEditToken() ) . "\n" . |
123 | 123 | Html::hidden( 'returnto', $this->getRequest()->getVal( 'returnto' ) ) . "\n" . |
124 | 124 | wfMsgExt( 'changeemail-text', array( 'parse' ) ) . "\n" . |
125 | 125 | Xml::openElement( 'table', array( 'id' => 'mw-changeemail-table' ) ) . "\n" . |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | $out->addWikiMsg( 'movepagetalktext' ); |
191 | 191 | } |
192 | 192 | |
193 | | - $token = htmlspecialchars( $user->editToken() ); |
| 193 | + $token = htmlspecialchars( $user->getEditToken() ); |
194 | 194 | |
195 | 195 | if ( !empty($err) ) { |
196 | 196 | $out->addSubtitle( $this->msg( 'formerror' ) ); |
Index: trunk/phase3/includes/specials/SpecialConfirmemail.php |
— | — | @@ -97,7 +97,7 @@ |
98 | 98 | } |
99 | 99 | $out->addWikiMsg( 'confirmemail_text' ); |
100 | 100 | $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalUrl() ) ); |
101 | | - $form .= Html::hidden( 'token', $user->editToken() ); |
| 101 | + $form .= Html::hidden( 'token', $user->getEditToken() ); |
102 | 102 | $form .= Xml::submitButton( wfMsg( 'confirmemail_send' ) ); |
103 | 103 | $form .= Xml::closeElement( 'form' ); |
104 | 104 | $out->addHTML( $form ); |
Index: trunk/phase3/includes/specials/SpecialChangePassword.php |
— | — | @@ -143,7 +143,7 @@ |
144 | 144 | 'method' => 'post', |
145 | 145 | 'action' => $this->getTitle()->getLocalUrl(), |
146 | 146 | 'id' => 'mw-resetpass-form' ) ) . "\n" . |
147 | | - Html::hidden( 'token', $user->editToken() ) . "\n" . |
| 147 | + Html::hidden( 'token', $user->getEditToken() ) . "\n" . |
148 | 148 | Html::hidden( 'wpName', $this->mUserName ) . "\n" . |
149 | 149 | Html::hidden( 'wpDomain', $this->mDomain ) . "\n" . |
150 | 150 | Html::hidden( 'returnto', $this->getRequest()->getVal( 'returnto' ) ) . "\n" . |
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php |
— | — | @@ -235,7 +235,7 @@ |
236 | 236 | $misc .= Html::hidden( 'destID', $this->mDestObj->getArticleID() ); |
237 | 237 | $misc .= Html::hidden( 'target', $this->mTarget ); |
238 | 238 | $misc .= Html::hidden( 'dest', $this->mDest ); |
239 | | - $misc .= Html::hidden( 'wpEditToken', $this->getUser()->editToken() ); |
| 239 | + $misc .= Html::hidden( 'wpEditToken', $this->getUser()->getEditToken() ); |
240 | 240 | $misc .= Xml::closeElement( 'form' ); |
241 | 241 | $out->addHTML( $misc ); |
242 | 242 | |