r75723 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75722‎ | r75723 | r75724 >
Date:16:33, 31 October 2010
Author:reedy
Status:ok (Comments)
Tags:
Comment:
More deprecated method calls
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)
  • /trunk/phase3/includes/OutputPage.php (modified) (history)
  • /trunk/phase3/includes/Preferences.php (modified) (history)
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)
  • /trunk/phase3/includes/installer/WebInstallerPage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialImport.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialNewpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchanges.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialSearch.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUserrights.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Preferences.php
@@ -529,7 +529,7 @@
530530 $nowlocal = Xml::element( 'span', array( 'id' => 'wpLocalTime' ),
531531 $wgLang->time( $now = wfTimestampNow(), true ) );
532532 $nowserver = $wgLang->time( $now, false ) .
533 - Xml::hidden( 'wpServerTime', substr( $now, 8, 2 ) * 60 + substr( $now, 10, 2 ) );
 533+ Html::hidden( 'wpServerTime', substr( $now, 8, 2 ) * 60 + substr( $now, 10, 2 ) );
534534
535535 $defaultPreferences['nowserver'] = array(
536536 'type' => 'info',
Index: trunk/phase3/includes/WatchlistEditor.php
@@ -351,7 +351,7 @@
352352 $self = SpecialPage::getTitleFor( 'Watchlist' );
353353 $form = Xml::openElement( 'form', array( 'method' => 'post',
354354 'action' => $self->getLocalUrl( array( 'action' => 'edit' ) ) ) );
355 - $form .= Xml::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) );
 355+ $form .= Html::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) );
356356 $form .= "<fieldset>\n<legend>" . wfMsgHtml( 'watchlistedit-normal-legend' ) . "</legend>";
357357 $form .= wfMsgExt( 'watchlistedit-normal-explain', 'parse' );
358358 $form .= $this->buildRemoveList( $user, $wgUser->getSkin() );
@@ -460,9 +460,9 @@
461461 global $wgUser;
462462 $this->showItemCount( $output, $user );
463463 $self = SpecialPage::getTitleFor( 'Watchlist' );
464 - $form = Xml::openElement( 'form', array( 'method' => 'post',
 464+ $form = Xml::openElement( 'form', array( 'method' => 'post',
465465 'action' => $self->getLocalUrl( array( 'action' => 'raw' ) ) ) );
466 - $form .= Xml::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) );
 466+ $form .= Html::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) );
467467 $form .= '<fieldset><legend>' . wfMsgHtml( 'watchlistedit-raw-legend' ) . '</legend>';
468468 $form .= wfMsgExt( 'watchlistedit-raw-explain', 'parse' );
469469 $form .= Xml::label( wfMsg( 'watchlistedit-raw-titles' ), 'titles' );
Index: trunk/phase3/includes/OutputPage.php
@@ -2056,7 +2056,6 @@
20572057 * @return none
20582058 */
20592059 public function addPasswordSecurity( $passwordId, $retypeId ) {
2060 - $this->includeJQuery();
20612060 $data = array(
20622061 'password' => '#' . $passwordId,
20632062 'retype' => '#' . $retypeId,
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -241,7 +241,7 @@
242242 'id' => 'mw-watchlist-resetbutton' ) ) .
243243 wfMsgExt( 'wlheader-showupdated', array( 'parseinline' ) ) . ' ' .
244244 Xml::submitButton( wfMsg( 'enotif_reset' ), array( 'name' => 'dummy' ) ) .
245 - Xml::hidden( 'reset', 'all' ) .
 245+ Html::hidden( 'reset', 'all' ) .
246246 Xml::closeElement( 'form' );
247247 }
248248 $form .= '<hr />';
@@ -316,17 +316,17 @@
317317 $form .= Xml::namespaceSelector( $nameSpace, '' ) . '&#160;';
318318 $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $invert ) . '&#160;';
319319 $form .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . '</p>';
320 - $form .= Xml::hidden( 'days', $days );
 320+ $form .= Html::hidden( 'days', $days );
321321 if( $hideMinor )
322 - $form .= Xml::hidden( 'hideMinor', 1 );
 322+ $form .= Html::hidden( 'hideMinor', 1 );
323323 if( $hideBots )
324 - $form .= Xml::hidden( 'hideBots', 1 );
 324+ $form .= Html::hidden( 'hideBots', 1 );
325325 if( $hideAnons )
326 - $form .= Xml::hidden( 'hideAnons', 1 );
 326+ $form .= Html::hidden( 'hideAnons', 1 );
327327 if( $hideLiu )
328 - $form .= Xml::hidden( 'hideLiu', 1 );
 328+ $form .= Html::hidden( 'hideLiu', 1 );
329329 if( $hideOwn )
330 - $form .= Xml::hidden( 'hideOwn', 1 );
 330+ $form .= Html::hidden( 'hideOwn', 1 );
331331 $form .= Xml::closeElement( 'form' );
332332 $form .= Xml::closeElement( 'fieldset' );
333333 $wgOut->addHTML( $form );
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -414,10 +414,10 @@
415415 '</td>' .
416416 "</tr>\n" .
417417 Xml::closeElement( 'table' ) .
418 - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
419 - Xml::hidden( 'target', $this->targetObj->getPrefixedText() ) .
420 - Xml::hidden( 'type', $this->typeName ) .
421 - Xml::hidden( 'ids', implode( ',', $this->ids ) ) .
 418+ Html::hidden( 'wpEditToken', $wgUser->editToken() ) .
 419+ Html::hidden( 'target', $this->targetObj->getPrefixedText() ) .
 420+ Html::hidden( 'type', $this->typeName ) .
 421+ Html::hidden( 'ids', implode( ',', $this->ids ) ) .
422422 Xml::closeElement( 'fieldset' ) . "\n";
423423 } else {
424424 $out = '';
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -494,7 +494,7 @@
495495 if ( in_array( $name, array( 'namespace', 'target', 'contribs' ) ) ) {
496496 continue;
497497 }
498 - $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
 498+ $f .= "\t" . Html::hidden( $name, $value ) . "\n";
499499 }
500500
501501 $f .= Xml::openElement( 'fieldset' ) .
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -223,7 +223,7 @@
224224 "</td>
225225 <td class='mw-input'>" .
226226 Xml::input( 'wpNewTitle', 40, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) .
227 - Xml::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
 227+ Html::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) .
228228 "</td>
229229 </tr>
230230 <tr>
@@ -326,7 +326,7 @@
327327 "</td>
328328 </tr>" .
329329 Xml::closeElement( 'table' ) .
330 - Xml::hidden( 'wpEditToken', $token ) .
 330+ Html::hidden( 'wpEditToken', $token ) .
331331 Xml::closeElement( 'fieldset' ) .
332332 Xml::closeElement( 'form' ) .
333333 "\n"
Index: trunk/phase3/includes/specials/SpecialSearch.php
@@ -821,9 +821,9 @@
822822 $namespaceTables .
823823 Xml::element( 'div', array( 'class' => 'divider' ), '', false ) .
824824 $redirects .
825 - Xml::hidden( 'title', SpecialPage::getTitleFor( 'Search' )->getPrefixedText() ) .
826 - Xml::hidden( 'advanced', $this->searchAdvanced ) .
827 - Xml::hidden( 'fulltext', 'Advanced search' ) .
 825+ Html::hidden( 'title', SpecialPage::getTitleFor( 'Search' )->getPrefixedText() ) .
 826+ Html::hidden( 'advanced', $this->searchAdvanced ) .
 827+ Html::hidden( 'fulltext', 'Advanced search' ) .
828828 Xml::closeElement( 'fieldset' );
829829 }
830830
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -384,9 +384,9 @@
385385 $f = Xml::openElement( 'form', array( 'action' => $wgScript ) );
386386
387387 # Values that should not be forgotten
388 - $f .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() );
 388+ $f .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() );
389389 foreach ( $this->opts->getUnconsumedValues() as $name => $value ) {
390 - $f .= Xml::hidden( $name, $value );
 390+ $f .= Html::hidden( $name, $value );
391391 }
392392
393393 $f .= Xml::fieldset( wfMsg( 'whatlinkshere' ) );
Index: trunk/phase3/includes/specials/SpecialRecentchanges.php
@@ -493,11 +493,11 @@
494494
495495 $unconsumed = $opts->getUnconsumedValues();
496496 foreach( $unconsumed as $key => $value ) {
497 - $out .= Xml::hidden( $key, $value );
 497+ $out .= Html::hidden( $key, $value );
498498 }
499499
500500 $t = $this->getTitle();
501 - $out .= Xml::hidden( 'title', $t->getPrefixedText() );
 501+ $out .= Html::hidden( 'title', $t->getPrefixedText() );
502502 $form = Xml::tags( 'form', array( 'action' => $wgScript ), $out );
503503 $panel[] = $form;
504504 $panelString = implode( "\n", $panel );
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -225,11 +225,11 @@
226226
227227 # When we submit, go by page ID to avoid some nasty but unlikely collisions.
228228 # Such would happen if a page was renamed after the form loaded, but before submit
229 - $misc = Xml::hidden( 'targetID', $this->mTargetObj->getArticleID() );
230 - $misc .= Xml::hidden( 'destID', $this->mDestObj->getArticleID() );
231 - $misc .= Xml::hidden( 'target', $this->mTarget );
232 - $misc .= Xml::hidden( 'dest', $this->mDest );
233 - $misc .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
 229+ $misc = Html::hidden( 'targetID', $this->mTargetObj->getArticleID() );
 230+ $misc .= Html::hidden( 'destID', $this->mDestObj->getArticleID() );
 231+ $misc .= Html::hidden( 'target', $this->mTarget );
 232+ $misc .= Html::hidden( 'dest', $this->mDest );
 233+ $misc .= Html::hidden( 'wpEditToken', $wgUser->editToken() );
234234 $misc .= Xml::closeElement( 'form' );
235235 $wgOut->addHTML( $misc );
236236
Index: trunk/phase3/includes/specials/SpecialUserrights.php
@@ -375,7 +375,7 @@
376376 global $wgOut, $wgScript;
377377 $wgOut->addHTML(
378378 Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) .
379 - Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
 379+ Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) .
380380 Xml::openElement( 'fieldset' ) .
381381 Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) .
382382 Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' .
@@ -440,8 +440,8 @@
441441 }
442442 $wgOut->addHTML(
443443 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) .
444 - Xml::hidden( 'user', $this->mTarget ) .
445 - Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->mTarget ) ) .
 444+ Html::hidden( 'user', $this->mTarget ) .
 445+ Html::hidden( 'wpEditToken', $wgUser->editToken( $this->mTarget ) ) .
446446 Xml::openElement( 'fieldset' ) .
447447 Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) .
448448 wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ) ) .
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -339,7 +339,7 @@
340340 if( in_array( $name, $skipParameters ) ) {
341341 continue;
342342 }
343 - $f .= "\t" . Xml::hidden( $name, $value ) . "\n";
 343+ $f .= "\t" . Html::hidden( $name, $value ) . "\n";
344344 }
345345
346346 $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] );
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -714,7 +714,7 @@
715715 'method' => 'get',
716716 'action' => $wgScript ) ) .
717717 Xml::fieldset( wfMsg( 'undelete-search-box' ) ) .
718 - Xml::hidden( 'title',
 718+ Html::hidden( 'title',
719719 $this->getTitle()->getPrefixedDbKey() ) .
720720 Xml::inputLabel( wfMsg( 'undelete-search-prefix' ),
721721 'prefix', 'prefix', 20,
@@ -1168,8 +1168,8 @@
11691169
11701170 if ( $this->mAllowed ) {
11711171 # Slip in the hidden controls here
1172 - $misc = Xml::hidden( 'target', $this->mTarget );
1173 - $misc .= Xml::hidden( 'wpEditToken', $wgUser->editToken() );
 1172+ $misc = Html::hidden( 'target', $this->mTarget );
 1173+ $misc .= Html::hidden( 'wpEditToken', $wgUser->editToken() );
11741174 $misc .= Xml::closeElement( 'form' );
11751175 $wgOut->addHTML( $misc );
11761176 }
Index: trunk/phase3/includes/specials/SpecialNewpages.php
@@ -205,7 +205,7 @@
206206 list( $tagFilterLabel, $tagFilterSelector ) = $tagFilter;
207207
208208 $form = Xml::openElement( 'form', array( 'action' => $wgScript ) ) .
209 - Xml::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
 209+ Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
210210 Xml::fieldset( wfMsg( 'newpages' ) ) .
211211 Xml::openElement( 'table', array( 'id' => 'mw-newpages-table' ) ) .
212212 "<tr>
Index: trunk/phase3/includes/specials/SpecialImport.php
@@ -206,9 +206,9 @@
207207 Xml::fieldset( wfMsg( 'importinterwiki' ) ) .
208208 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'mw-import-interwiki-form' ) ) .
209209 wfMsgExt( 'import-interwiki-text', array( 'parse' ) ) .
210 - Xml::hidden( 'action', 'submit' ) .
211 - Xml::hidden( 'source', 'interwiki' ) .
212 - Xml::hidden( 'editToken', $wgUser->editToken() ) .
 210+ Html::hidden( 'action', 'submit' ) .
 211+ Html::hidden( 'source', 'interwiki' ) .
 212+ Html::hidden( 'editToken', $wgUser->editToken() ) .
213213 Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) .
214214 "<tr>
215215 <td class='mw-label'>" .
Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -359,8 +359,8 @@
360360 </td>
361361 </tr>" .
362362 Xml::closeElement( 'table' ) .
363 - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
364 - ( $alreadyBlocked ? Xml::hidden( 'wpChangeBlock', 1 ) : "" ) .
 363+ Html::hidden( 'wpEditToken', $wgUser->editToken() ) .
 364+ ( $alreadyBlocked ? Html::hidden( 'wpChangeBlock', 1 ) : "" ) .
365365 Xml::closeElement( 'fieldset' ) .
366366 Xml::closeElement( 'form' ) .
367367 Xml::tags( 'script', array( 'type' => 'text/javascript' ), 'updateBlockOptions()' ) . "\n"
Index: trunk/phase3/includes/installer/WebInstallerPage.php
@@ -214,8 +214,7 @@
215215 $contLang = $this->getVar( 'wgLanguageCode', 'en' );
216216 }
217217 $this->startForm();
218 - $s =
219 - Xml::hidden( 'LanguageRequestTime', time() ) .
 218+ $s = Html::hidden( 'LanguageRequestTime', time() ) .
220219 $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) .
221220 $this->parent->getHelpBox( 'config-your-language-help' ) .
222221 $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) .
Index: trunk/phase3/includes/EditPage.php
@@ -1274,11 +1274,11 @@
12751275 # automatic one and pass that in the hidden field wpAutoSummary.
12761276 if ( $this->missingSummary ||
12771277 ( $this->section == 'new' && $this->nosummary ) )
1278 - $wgOut->addHTML( Xml::hidden( 'wpIgnoreBlankSummary', true ) );
 1278+ $wgOut->addHTML( Html::hidden( 'wpIgnoreBlankSummary', true ) );
12791279 $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary );
1280 - $wgOut->addHTML( Xml::hidden( 'wpAutoSummary', $autosumm ) );
 1280+ $wgOut->addHTML( Html::hidden( 'wpAutoSummary', $autosumm ) );
12811281
1282 - $wgOut->addHTML( Xml::hidden( 'oldid', $this->mArticle->getOldID() ) );
 1282+ $wgOut->addHTML( Html::hidden( 'oldid', $this->mArticle->getOldID() ) );
12831283
12841284 if ( $this->section == 'new' ) {
12851285 $this->showSummaryInput( true, $this->summary );
@@ -1567,7 +1567,7 @@
15681568 HTML
15691569 );
15701570 if ( !$this->checkUnicodeCompliantBrowser() )
1571 - $wgOut->addHTML(Xml::hidden( 'safemode', '1' ));
 1571+ $wgOut->addHTML(Html::hidden( 'safemode', '1' ));
15721572 }
15731573
15741574 protected function showFormAfterText() {
@@ -1584,7 +1584,7 @@
15851585 * include the constant suffix to prevent editing from
15861586 * broken text-mangling proxies.
15871587 */
1588 - $wgOut->addHTML( "\n" . Xml::hidden( "wpEditToken", $wgUser->editToken() ) . "\n" );
 1588+ $wgOut->addHTML( "\n" . Html::hidden( "wpEditToken", $wgUser->editToken() ) . "\n" );
15891589 }
15901590
15911591 /**
Index: trunk/phase3/includes/ImagePage.php
@@ -442,7 +442,7 @@
443443 $wgOut->addHTML(
444444 '</td><td><div class="multipageimagenavbox">' .
445445 Xml::openElement( 'form', $formParams ) .
446 - Xml::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
 446+ Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
447447 wfMsgExt( 'imgmultigoto', array( 'parseinline', 'replaceafter' ), $select ) .
448448 Xml::submitButton( wfMsg( 'imgmultigo' ) ) .
449449 Xml::closeElement( 'form' ) .
Index: trunk/phase3/includes/Article.php
@@ -3081,7 +3081,7 @@
30823082 </tr>" .
30833083 Xml::closeElement( 'table' ) .
30843084 Xml::closeElement( 'fieldset' ) .
3085 - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) .
 3085+ Html::hidden( 'wpEditToken', $wgUser->editToken() ) .
30863086 Xml::closeElement( 'form' );
30873087
30883088 if ( $wgUser->isAllowed( 'editinterface' ) ) {

Follow-up revisions

RevisionCommit summaryAuthorDate
r75727A couple of Xml::hidden calls left by r75723platonides18:17, 31 October 2010

Comments

#Comment by Platonides (talk | contribs)   18:14, 31 October 2010

So you entered with Xml::hidden. There used to be 100 calls of those.

Status & tagging log