$attribs = array( 'id' => 'wpTextbox1', 'name' => 'wpTextbox1', 'cols' => $cols, 'rows' => $rows, 'readonly' => 'readonly' );
$wgOut->addHtml( '<hr />' );
$wgOut->addWikiMsg( $first ? 'blockedoriginalsource' : 'blockededitsource', $this->mTitle->getPrefixedText() );
- $wgOut->addHtml( wfOpenElement( 'textarea', $attribs ) . htmlspecialchars( $source ) . wfCloseElement( 'textarea' ) );
+ # Why we don't use Xml::element here?
+ # Is it because if $source is '', it returns <textarea />?
+ $wgOut->addHtml( Xml::openElement( 'textarea', $attribs ) . htmlspecialchars( $source ) . Xml::closeElement( 'textarea' ) );
}
}
$wgOut->addHtml( '<div id="spamprotected">' );
$wgOut->addWikiMsg( 'spamprotectiontext' );
if ( $match )
- $wgOut->addWikiMsg( 'spamprotectionmatch',wfEscapeWikiText( $match ) );
+ $wgOut->addWikiMsg( 'spamprotectionmatch', wfEscapeWikiText( $match ) );
$wgOut->addHtml( '</div>' );
$wgOut->returnToMain( false, $wgTitle );
'accesskey' => wfMsg('accesskey-save'),
'title' => wfMsg( 'tooltip-save' ).' ['.wfMsg( 'accesskey-save' ).']',
);
- $buttons['save'] = wfElement('input', $temp, '');
+ $buttons['save'] = Xml::element('input', $temp, '');
++$tabindex; // use the same for preview and live preview
if ( $wgLivePreview && $wgUser->getOption( 'uselivepreview' ) ) {
'title' => wfMsg( 'tooltip-preview' ).' ['.wfMsg( 'accesskey-preview' ).']',
'style' => 'display: none;',
);
- $buttons['preview'] = wfElement('input', $temp, '');
+ $buttons['preview'] = Xml::element('input', $temp, '');
$temp = array(
'id' => 'wpLivePreview',
'title' => '',
'onclick' => $this->doLivePreviewScript(),
);
- $buttons['live'] = wfElement('input', $temp, '');
+ $buttons['live'] = Xml::element('input', $temp, '');
} else {
$temp = array(
'id' => 'wpPreview',
'accesskey' => wfMsg('accesskey-preview'),
'title' => wfMsg( 'tooltip-preview' ).' ['.wfMsg( 'accesskey-preview' ).']',
);
- $buttons['preview'] = wfElement('input', $temp, '');
+ $buttons['preview'] = Xml::element('input', $temp, '');
$buttons['live'] = '';
}
'accesskey' => wfMsg('accesskey-diff'),
'title' => wfMsg( 'tooltip-diff' ).' ['.wfMsg( 'accesskey-diff' ).']',
);
- $buttons['diff'] = wfElement('input', $temp, '');
+ $buttons['diff'] = Xml::element('input', $temp, '');
wfRunHooks( 'EditPageBeforeEditButtons', array( &$this, &$buttons ) );
return $buttons;