wfProfileIn( __METHOD__ );
- $sk = $wgUser->getSkin();
-
#need to parse the preview early so that we know which templates are used,
#otherwise users with "show preview after edit box" will get a blank list
#we parse this near the beginning so that setHeaders can do the title
$wgOut->addHTML( $this->editFormTextTop );
$templates = $this->getTemplates();
- $formattedtemplates = $sk->formatTemplates( $templates, $this->preview, $this->section != '');
+ $formattedtemplates = Linker::formatTemplates( $templates, $this->preview, $this->section != '');
$hiddencats = $this->mArticle->getHiddenCategories();
- $formattedhiddencats = $sk->formatHiddenCategories( $hiddencats );
+ $formattedhiddencats = Linker::formatHiddenCategories( $hiddencats );
if ( $this->wasDeletedSinceLastEdit() && 'save' != $this->formtype ) {
$wgOut->wrapWikiMsg(
'<div class="mw-confirm-recreate">' .
wfMsgExt( $key, 'parseinline', $username, "<nowiki>$comment</nowiki>" ) .
Xml::checkLabel( wfMsg( 'recreate' ), 'wpRecreate', 'wpRecreate', false,
- array( 'title' => $sk->titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' )
+ array( 'title' => Linker::titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' )
) .
'</div>'
);
if ( !$summary || ( !$this->preview && !$this->diff ) )
return "";
- global $wgParser, $wgUser;
- $sk = $wgUser->getSkin();
+ global $wgParser;
if ( $isSubjectPreview )
$summary = wfMsgForContent( 'newsectionsummary', $wgParser->stripSectionName( $summary ) );
$message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
- $summary = wfMsgExt( $message, 'parseinline' ) . $sk->commentBlock( $summary, $this->mTitle, $isSubjectPreview );
+ $summary = wfMsgExt( $message, 'parseinline' ) . Linker::commentBlock( $summary, $this->mTitle, $isSubjectPreview );
return Xml::tags( 'div', array( 'class' => 'mw-summary-preview' ), $summary );
}
if( !wfMessage( $msg )->isDisabled() ) {
global $wgOut;
$wgOut->addHTML( '<div class="mw-tos-summary">' );
- $wgOut->addWikiMsgArray( $msg, array() );
+ $wgOut->addWikiMsg( $msg );
$wgOut->addHTML( '</div>' );
}
}
protected function showEditTools() {
global $wgOut;
- $wgOut->addHTML( '<div class="mw-editTools">' );
- $wgOut->addWikiMsgArray( 'edittools', array(), array( 'content' ) );
- $wgOut->addHTML( '</div>' );
+ $wgOut->addHTML( '<div class="mw-editTools">' .
+ wfMessage( 'edittools' )->inContentLanguage()->parse() .
+ '</div>' );
}
protected function getCopywarn() {
}
protected function showStandardInputs( &$tabindex = 2 ) {
- global $wgOut, $wgUser;
+ global $wgOut;
$wgOut->addHTML( "<div class='editOptions'>\n" );
if ( $this->section != 'new' ) {
$wgOut->addHTML( $this->getSummaryPreview( false, $this->summary ) );
}
- $checkboxes = $this->getCheckboxes( $tabindex, $wgUser->getSkin(),
+ $checkboxes = $this->getCheckboxes( $tabindex,
array( 'minor' => $this->minoredit, 'watch' => $this->watchthis ) );
$wgOut->addHTML( "<div class='editCheckboxes'>" . implode( $checkboxes, "\n" ) . "</div>\n" );
$wgOut->addHTML( "<div class='editButtons'>\n" );
* Produce the stock "please login to edit pages" page
*/
function userNotLoggedInPage() {
- global $wgUser, $wgOut;
- $skin = $wgUser->getSkin();
+ global $wgOut;
$loginTitle = SpecialPage::getTitleFor( 'Userlogin' );
- $loginLink = $skin->link(
+ $loginLink = Linker::linkKnown(
$loginTitle,
wfMsgHtml( 'loginreqlink' ),
array(),
- array( 'returnto' => $this->getContextTitle()->getPrefixedText() ),
- array( 'known', 'noclasses' )
+ array( 'returnto' => $this->getContextTitle()->getPrefixedText() )
);
$wgOut->setPageTitle( wfMsg( 'whitelistedittitle' ) );
$wgOut->setRobotPolicy( 'noindex,nofollow' );
$wgOut->setArticleRelated( false );
- $wgOut->addWikiMsgArray( 'whitelistedittext', array( $loginLink ), array( 'replaceafter' ) );
+ $wgOut->addHTML( wfMessage( 'whitelistedittext' )->rawParams( $loginLink )->parse() );
$wgOut->returnToMain( false, $this->getContextTitle() );
}
* minor and watch
*
* @param $tabindex Current tabindex
- * @param $skin Skin object
* @param $checked Array of checkbox => bool, where bool indicates the checked
* status of the checkbox
*
* @return array
*/
- public function getCheckboxes( &$tabindex, $skin, $checked ) {
+ public function getCheckboxes( &$tabindex, $checked ) {
global $wgUser;
$checkboxes = array();
$checkboxes['minor'] =
Xml::check( 'wpMinoredit', $checked['minor'], $attribs ) .
" <label for='wpMinoredit' id='mw-editpage-minoredit'" .
- Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'minoredit', 'withaccess' ) ) ) .
+ Xml::expandAttributes( array( 'title' => Linker::titleAttrib( 'minoredit', 'withaccess' ) ) ) .
">{$minorLabel}</label>";
}
}
$checkboxes['watch'] =
Xml::check( 'wpWatchthis', $checked['watch'], $attribs ) .
" <label for='wpWatchthis' id='mw-editpage-watch'" .
- Xml::expandAttributes( array( 'title' => $skin->titleAttrib( 'watch', 'withaccess' ) ) ) .
+ Xml::expandAttributes( array( 'title' => Linker::titleAttrib( 'watch', 'withaccess' ) ) ) .
">{$watchLabel}</label>";
}
wfRunHooks( 'EditPageBeforeEditChecks', array( &$this, &$checkboxes, &$tabindex ) );
* @return string
*/
public function getCancelLink() {
- global $wgUser;
-
$cancelParams = array();
if ( !$this->isConflict && $this->mArticle->getOldID() > 0 ) {
$cancelParams['oldid'] = $this->mArticle->getOldID();
}
- return $wgUser->getSkin()->link(
+ return Linker::linkKnown(
$this->getContextTitle(),
wfMsgExt( 'cancel', array( 'parseinline' ) ),
array( 'id' => 'mw-editform-cancel' ),
- $cancelParams,
- array( 'known', 'noclasses' )
+ $cancelParams
);
}