From efd835888254cd47389647537d4ba83162ec3bce Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 31 Oct 2010 16:33:48 +0000 Subject: [PATCH] More deprecated method calls --- includes/Article.php | 2 +- includes/EditPage.php | 10 +++++----- includes/ImagePage.php | 2 +- includes/OutputPage.php | 1 - includes/Preferences.php | 2 +- includes/WatchlistEditor.php | 6 +++--- includes/installer/WebInstallerPage.php | 3 +-- includes/specials/SpecialBlockip.php | 4 ++-- includes/specials/SpecialContributions.php | 2 +- includes/specials/SpecialDeletedContributions.php | 2 +- includes/specials/SpecialImport.php | 6 +++--- includes/specials/SpecialMergeHistory.php | 10 +++++----- includes/specials/SpecialMovepage.php | 4 ++-- includes/specials/SpecialNewpages.php | 2 +- includes/specials/SpecialRecentchanges.php | 4 ++-- includes/specials/SpecialRevisiondelete.php | 8 ++++---- includes/specials/SpecialSearch.php | 6 +++--- includes/specials/SpecialUndelete.php | 6 +++--- includes/specials/SpecialUserrights.php | 6 +++--- includes/specials/SpecialWatchlist.php | 14 +++++++------- includes/specials/SpecialWhatlinkshere.php | 4 ++-- 21 files changed, 51 insertions(+), 53 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index fe9efa3c1a..c2ac338768 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -3081,7 +3081,7 @@ class Article { " . Xml::closeElement( 'table' ) . Xml::closeElement( 'fieldset' ) . - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . + Html::hidden( 'wpEditToken', $wgUser->editToken() ) . Xml::closeElement( 'form' ); if ( $wgUser->isAllowed( 'editinterface' ) ) { diff --git a/includes/EditPage.php b/includes/EditPage.php index 45abdfcbd3..1d1dead3d1 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1274,11 +1274,11 @@ HTML # automatic one and pass that in the hidden field wpAutoSummary. if ( $this->missingSummary || ( $this->section == 'new' && $this->nosummary ) ) - $wgOut->addHTML( Xml::hidden( 'wpIgnoreBlankSummary', true ) ); + $wgOut->addHTML( Html::hidden( 'wpIgnoreBlankSummary', true ) ); $autosumm = $this->autoSumm ? $this->autoSumm : md5( $this->summary ); - $wgOut->addHTML( Xml::hidden( 'wpAutoSummary', $autosumm ) ); + $wgOut->addHTML( Html::hidden( 'wpAutoSummary', $autosumm ) ); - $wgOut->addHTML( Xml::hidden( 'oldid', $this->mArticle->getOldID() ) ); + $wgOut->addHTML( Html::hidden( 'oldid', $this->mArticle->getOldID() ) ); if ( $this->section == 'new' ) { $this->showSummaryInput( true, $this->summary ); @@ -1567,7 +1567,7 @@ HTML HTML ); if ( !$this->checkUnicodeCompliantBrowser() ) - $wgOut->addHTML(Xml::hidden( 'safemode', '1' )); + $wgOut->addHTML(Html::hidden( 'safemode', '1' )); } protected function showFormAfterText() { @@ -1584,7 +1584,7 @@ HTML * include the constant suffix to prevent editing from * broken text-mangling proxies. */ - $wgOut->addHTML( "\n" . Xml::hidden( "wpEditToken", $wgUser->editToken() ) . "\n" ); + $wgOut->addHTML( "\n" . Html::hidden( "wpEditToken", $wgUser->editToken() ) . "\n" ); } /** diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 1bfbdc97fa..ea3ba16727 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -442,7 +442,7 @@ class ImagePage extends Article { $wgOut->addHTML( '
' . Xml::openElement( 'form', $formParams ) . - Xml::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . + Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . wfMsgExt( 'imgmultigoto', array( 'parseinline', 'replaceafter' ), $select ) . Xml::submitButton( wfMsg( 'imgmultigo' ) ) . Xml::closeElement( 'form' ) . diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 81918c8d63..b78cf568df 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2056,7 +2056,6 @@ class OutputPage { * @return none */ public function addPasswordSecurity( $passwordId, $retypeId ) { - $this->includeJQuery(); $data = array( 'password' => '#' . $passwordId, 'retype' => '#' . $retypeId, diff --git a/includes/Preferences.php b/includes/Preferences.php index 9b5d306897..e4b4860f8d 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -529,7 +529,7 @@ class Preferences { $nowlocal = Xml::element( 'span', array( 'id' => 'wpLocalTime' ), $wgLang->time( $now = wfTimestampNow(), true ) ); $nowserver = $wgLang->time( $now, false ) . - Xml::hidden( 'wpServerTime', substr( $now, 8, 2 ) * 60 + substr( $now, 10, 2 ) ); + Html::hidden( 'wpServerTime', substr( $now, 8, 2 ) * 60 + substr( $now, 10, 2 ) ); $defaultPreferences['nowserver'] = array( 'type' => 'info', diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 99f7a56e28..8850d26053 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -351,7 +351,7 @@ class WatchlistEditor { $self = SpecialPage::getTitleFor( 'Watchlist' ); $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl( array( 'action' => 'edit' ) ) ) ); - $form .= Xml::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) ); + $form .= Html::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) ); $form .= "
\n" . wfMsgHtml( 'watchlistedit-normal-legend' ) . ""; $form .= wfMsgExt( 'watchlistedit-normal-explain', 'parse' ); $form .= $this->buildRemoveList( $user, $wgUser->getSkin() ); @@ -460,9 +460,9 @@ class WatchlistEditor { global $wgUser; $this->showItemCount( $output, $user ); $self = SpecialPage::getTitleFor( 'Watchlist' ); - $form = Xml::openElement( 'form', array( 'method' => 'post', + $form = Xml::openElement( 'form', array( 'method' => 'post', 'action' => $self->getLocalUrl( array( 'action' => 'raw' ) ) ) ); - $form .= Xml::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) ); + $form .= Html::hidden( 'token', $wgUser->editToken( 'watchlistedit' ) ); $form .= '
' . wfMsgHtml( 'watchlistedit-raw-legend' ) . ''; $form .= wfMsgExt( 'watchlistedit-raw-explain', 'parse' ); $form .= Xml::label( wfMsg( 'watchlistedit-raw-titles' ), 'titles' ); diff --git a/includes/installer/WebInstallerPage.php b/includes/installer/WebInstallerPage.php index 116db0bb16..3f3ac5dbd3 100644 --- a/includes/installer/WebInstallerPage.php +++ b/includes/installer/WebInstallerPage.php @@ -214,8 +214,7 @@ class WebInstaller_Language extends WebInstallerPage { $contLang = $this->getVar( 'wgLanguageCode', 'en' ); } $this->startForm(); - $s = - Xml::hidden( 'LanguageRequestTime', time() ) . + $s = Html::hidden( 'LanguageRequestTime', time() ) . $this->getLanguageSelector( 'UserLang', 'config-your-language', $userLang ) . $this->parent->getHelpBox( 'config-your-language-help' ) . $this->getLanguageSelector( 'ContLang', 'config-wiki-language', $contLang ) . diff --git a/includes/specials/SpecialBlockip.php b/includes/specials/SpecialBlockip.php index f4abc7c735..eccf75dc64 100644 --- a/includes/specials/SpecialBlockip.php +++ b/includes/specials/SpecialBlockip.php @@ -359,8 +359,8 @@ class IPBlockForm extends SpecialPage { " . Xml::closeElement( 'table' ) . - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . - ( $alreadyBlocked ? Xml::hidden( 'wpChangeBlock', 1 ) : "" ) . + Html::hidden( 'wpEditToken', $wgUser->editToken() ) . + ( $alreadyBlocked ? Html::hidden( 'wpChangeBlock', 1 ) : "" ) . Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) . Xml::tags( 'script', array( 'type' => 'text/javascript' ), 'updateBlockOptions()' ) . "\n" diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index ad7909f39b..b9113970f3 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -339,7 +339,7 @@ class SpecialContributions extends SpecialPage { if( in_array( $name, $skipParameters ) ) { continue; } - $f .= "\t" . Xml::hidden( $name, $value ) . "\n"; + $f .= "\t" . Html::hidden( $name, $value ) . "\n"; } $tagFilter = ChangeTags::buildTagFilterSelector( $this->opts['tagFilter'] ); diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index c501c87f22..92e225864b 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -494,7 +494,7 @@ class DeletedContributionsPage extends SpecialPage { if ( in_array( $name, array( 'namespace', 'target', 'contribs' ) ) ) { continue; } - $f .= "\t" . Xml::hidden( $name, $value ) . "\n"; + $f .= "\t" . Html::hidden( $name, $value ) . "\n"; } $f .= Xml::openElement( 'fieldset' ) . diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 77d45d23ae..87e64eaee9 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -206,9 +206,9 @@ class SpecialImport extends SpecialPage { Xml::fieldset( wfMsg( 'importinterwiki' ) ) . Xml::openElement( 'form', array( 'method' => 'post', 'action' => $action, 'id' => 'mw-import-interwiki-form' ) ) . wfMsgExt( 'import-interwiki-text', array( 'parse' ) ) . - Xml::hidden( 'action', 'submit' ) . - Xml::hidden( 'source', 'interwiki' ) . - Xml::hidden( 'editToken', $wgUser->editToken() ) . + Html::hidden( 'action', 'submit' ) . + Html::hidden( 'source', 'interwiki' ) . + Html::hidden( 'editToken', $wgUser->editToken() ) . Xml::openElement( 'table', array( 'id' => 'mw-import-table' ) ) . " " . diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index ad044137b8..43b4ef6ad0 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -225,11 +225,11 @@ class SpecialMergeHistory extends SpecialPage { # When we submit, go by page ID to avoid some nasty but unlikely collisions. # Such would happen if a page was renamed after the form loaded, but before submit - $misc = Xml::hidden( 'targetID', $this->mTargetObj->getArticleID() ); - $misc .= Xml::hidden( 'destID', $this->mDestObj->getArticleID() ); - $misc .= Xml::hidden( 'target', $this->mTarget ); - $misc .= Xml::hidden( 'dest', $this->mDest ); - $misc .= Xml::hidden( 'wpEditToken', $wgUser->editToken() ); + $misc = Html::hidden( 'targetID', $this->mTargetObj->getArticleID() ); + $misc .= Html::hidden( 'destID', $this->mDestObj->getArticleID() ); + $misc .= Html::hidden( 'target', $this->mTarget ); + $misc .= Html::hidden( 'dest', $this->mDest ); + $misc .= Html::hidden( 'wpEditToken', $wgUser->editToken() ); $misc .= Xml::closeElement( 'form' ); $wgOut->addHTML( $misc ); diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index ac012690f7..630c69c8af 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -223,7 +223,7 @@ class MovePageForm extends UnlistedSpecialPage { " " . Xml::input( 'wpNewTitle', 40, $wgContLang->recodeForEdit( $newTitle->getPrefixedText() ), array( 'type' => 'text', 'id' => 'wpNewTitle' ) ) . - Xml::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) . + Html::hidden( 'wpOldTitle', $this->oldTitle->getPrefixedText() ) . " @@ -326,7 +326,7 @@ class MovePageForm extends UnlistedSpecialPage { " " . Xml::closeElement( 'table' ) . - Xml::hidden( 'wpEditToken', $token ) . + Html::hidden( 'wpEditToken', $token ) . Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ) . "\n" diff --git a/includes/specials/SpecialNewpages.php b/includes/specials/SpecialNewpages.php index 8f5031f953..8da2c08e44 100644 --- a/includes/specials/SpecialNewpages.php +++ b/includes/specials/SpecialNewpages.php @@ -205,7 +205,7 @@ class SpecialNewpages extends IncludableSpecialPage { list( $tagFilterLabel, $tagFilterSelector ) = $tagFilter; $form = Xml::openElement( 'form', array( 'action' => $wgScript ) ) . - Xml::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . + Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . Xml::fieldset( wfMsg( 'newpages' ) ) . Xml::openElement( 'table', array( 'id' => 'mw-newpages-table' ) ) . " diff --git a/includes/specials/SpecialRecentchanges.php b/includes/specials/SpecialRecentchanges.php index 638355f9c3..c012beca38 100644 --- a/includes/specials/SpecialRecentchanges.php +++ b/includes/specials/SpecialRecentchanges.php @@ -493,11 +493,11 @@ class SpecialRecentChanges extends IncludableSpecialPage { $unconsumed = $opts->getUnconsumedValues(); foreach( $unconsumed as $key => $value ) { - $out .= Xml::hidden( $key, $value ); + $out .= Html::hidden( $key, $value ); } $t = $this->getTitle(); - $out .= Xml::hidden( 'title', $t->getPrefixedText() ); + $out .= Html::hidden( 'title', $t->getPrefixedText() ); $form = Xml::tags( 'form', array( 'action' => $wgScript ), $out ); $panel[] = $form; $panelString = implode( "\n", $panel ); diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 0a7b642436..f77fc347f4 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -414,10 +414,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { '' . "\n" . Xml::closeElement( 'table' ) . - Xml::hidden( 'wpEditToken', $wgUser->editToken() ) . - Xml::hidden( 'target', $this->targetObj->getPrefixedText() ) . - Xml::hidden( 'type', $this->typeName ) . - Xml::hidden( 'ids', implode( ',', $this->ids ) ) . + Html::hidden( 'wpEditToken', $wgUser->editToken() ) . + Html::hidden( 'target', $this->targetObj->getPrefixedText() ) . + Html::hidden( 'type', $this->typeName ) . + Html::hidden( 'ids', implode( ',', $this->ids ) ) . Xml::closeElement( 'fieldset' ) . "\n"; } else { $out = ''; diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index f5769aaa4d..0a25f244bc 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -821,9 +821,9 @@ class SpecialSearch { $namespaceTables . Xml::element( 'div', array( 'class' => 'divider' ), '', false ) . $redirects . - Xml::hidden( 'title', SpecialPage::getTitleFor( 'Search' )->getPrefixedText() ) . - Xml::hidden( 'advanced', $this->searchAdvanced ) . - Xml::hidden( 'fulltext', 'Advanced search' ) . + Html::hidden( 'title', SpecialPage::getTitleFor( 'Search' )->getPrefixedText() ) . + Html::hidden( 'advanced', $this->searchAdvanced ) . + Html::hidden( 'fulltext', 'Advanced search' ) . Xml::closeElement( 'fieldset' ); } diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index c98caebc47..69390f557a 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -714,7 +714,7 @@ class UndeleteForm extends SpecialPage { 'method' => 'get', 'action' => $wgScript ) ) . Xml::fieldset( wfMsg( 'undelete-search-box' ) ) . - Xml::hidden( 'title', + Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . Xml::inputLabel( wfMsg( 'undelete-search-prefix' ), 'prefix', 'prefix', 20, @@ -1168,8 +1168,8 @@ class UndeleteForm extends SpecialPage { if ( $this->mAllowed ) { # Slip in the hidden controls here - $misc = Xml::hidden( 'target', $this->mTarget ); - $misc .= Xml::hidden( 'wpEditToken', $wgUser->editToken() ); + $misc = Html::hidden( 'target', $this->mTarget ); + $misc .= Html::hidden( 'wpEditToken', $wgUser->editToken() ); $misc .= Xml::closeElement( 'form' ); $wgOut->addHTML( $misc ); } diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index c12c600939..050b81e16c 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -375,7 +375,7 @@ class UserrightsPage extends SpecialPage { global $wgOut, $wgScript; $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'name' => 'uluser', 'id' => 'mw-userrights-form1' ) ) . - Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ) . + Html::hidden( 'title', $this->getTitle()->getPrefixedText() ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'userrights-lookup-user' ) ) . Xml::inputLabel( wfMsg( 'userrights-user-editname' ), 'user', 'username', 30, $this->mTarget ) . ' ' . @@ -440,8 +440,8 @@ class UserrightsPage extends SpecialPage { } $wgOut->addHTML( Xml::openElement( 'form', array( 'method' => 'post', 'action' => $this->getTitle()->getLocalURL(), 'name' => 'editGroup', 'id' => 'mw-userrights-form2' ) ) . - Xml::hidden( 'user', $this->mTarget ) . - Xml::hidden( 'wpEditToken', $wgUser->editToken( $this->mTarget ) ) . + Html::hidden( 'user', $this->mTarget ) . + Html::hidden( 'wpEditToken', $wgUser->editToken( $this->mTarget ) ) . Xml::openElement( 'fieldset' ) . Xml::element( 'legend', array(), wfMsg( 'userrights-editusergroup' ) ) . wfMsgExt( 'editinguser', array( 'parse' ), wfEscapeWikiText( $user->getName() ) ) . diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 8d0523dac3..4b622ba066 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -241,7 +241,7 @@ function wfSpecialWatchlist( $par ) { 'id' => 'mw-watchlist-resetbutton' ) ) . wfMsgExt( 'wlheader-showupdated', array( 'parseinline' ) ) . ' ' . Xml::submitButton( wfMsg( 'enotif_reset' ), array( 'name' => 'dummy' ) ) . - Xml::hidden( 'reset', 'all' ) . + Html::hidden( 'reset', 'all' ) . Xml::closeElement( 'form' ); } $form .= '
'; @@ -316,17 +316,17 @@ function wfSpecialWatchlist( $par ) { $form .= Xml::namespaceSelector( $nameSpace, '' ) . ' '; $form .= Xml::checkLabel( wfMsg('invert'), 'invert', 'nsinvert', $invert ) . ' '; $form .= Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . '

'; - $form .= Xml::hidden( 'days', $days ); + $form .= Html::hidden( 'days', $days ); if( $hideMinor ) - $form .= Xml::hidden( 'hideMinor', 1 ); + $form .= Html::hidden( 'hideMinor', 1 ); if( $hideBots ) - $form .= Xml::hidden( 'hideBots', 1 ); + $form .= Html::hidden( 'hideBots', 1 ); if( $hideAnons ) - $form .= Xml::hidden( 'hideAnons', 1 ); + $form .= Html::hidden( 'hideAnons', 1 ); if( $hideLiu ) - $form .= Xml::hidden( 'hideLiu', 1 ); + $form .= Html::hidden( 'hideLiu', 1 ); if( $hideOwn ) - $form .= Xml::hidden( 'hideOwn', 1 ); + $form .= Html::hidden( 'hideOwn', 1 ); $form .= Xml::closeElement( 'form' ); $form .= Xml::closeElement( 'fieldset' ); $wgOut->addHTML( $form ); diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 74bc2f64b5..1e0e10e8ad 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -384,9 +384,9 @@ class SpecialWhatLinksHere extends SpecialPage { $f = Xml::openElement( 'form', array( 'action' => $wgScript ) ); # Values that should not be forgotten - $f .= Xml::hidden( 'title', $this->getTitle()->getPrefixedText() ); + $f .= Html::hidden( 'title', $this->getTitle()->getPrefixedText() ); foreach ( $this->opts->getUnconsumedValues() as $name => $value ) { - $f .= Xml::hidden( $name, $value ); + $f .= Html::hidden( $name, $value ); } $f .= Xml::fieldset( wfMsg( 'whatlinkshere' ) ); -- 2.20.1