/**
* Display a read-only View Source page
- * @param Content $content content object
+ * @param Content $content
* @param string $errorMessage additional wikitext error message to display
*/
protected function displayViewSourcePage( Content $content, $errorMessage = '' ) {
* @return string HTML
*/
public static function getPreviewLimitReport( $output ) {
+ global $wgLang;
+
if ( !$output || !$output->getLimitReportData() ) {
return '';
}
if ( !$keyMsg->isDisabled() && !$valueMsg->isDisabled() ) {
$limitReport .= Html::openElement( 'tr' ) .
Html::rawElement( 'th', null, $keyMsg->parse() ) .
- Html::rawElement( 'td', null, $valueMsg->params( $value )->parse() ) .
+ Html::rawElement( 'td', null,
+ $wgLang->formatNum( $valueMsg->params( $value )->parse() )
+ ) .
Html::closeElement( 'tr' );
}
}
$buttonLabel = $this->context->msg( $this->getSubmitButtonLabel() )->text();
- $attribs = [
- 'name' => 'wpSave',
- 'tabindex' => ++$tabindex,
- ];
-
- $saveConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
$buttons['save'] = new OOUI\ButtonInputWidget( [
+ 'name' => 'wpSave',
+ 'tabIndex' => ++$tabindex,
'id' => 'wpSaveWidget',
'inputId' => 'wpSave',
// Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
'useInputTag' => true,
- 'flags' => [ 'constructive', 'primary' ],
+ 'flags' => [ 'progressive', 'primary' ],
'label' => $buttonLabel,
'infusable' => true,
'type' => 'submit',
'title' => Linker::titleAttrib( 'save' ),
'accessKey' => Linker::accesskey( 'save' ),
- ] + $saveConfig );
-
- $attribs = [
- 'name' => 'wpPreview',
- 'tabindex' => ++$tabindex,
- ];
+ ] );
- $previewConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
$buttons['preview'] = new OOUI\ButtonInputWidget( [
+ 'name' => 'wpPreview',
+ 'tabIndex' => ++$tabindex,
'id' => 'wpPreviewWidget',
'inputId' => 'wpPreview',
// Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
'type' => 'submit',
'title' => Linker::titleAttrib( 'preview' ),
'accessKey' => Linker::accesskey( 'preview' ),
- ] + $previewConfig );
-
- $attribs = [
- 'name' => 'wpDiff',
- 'tabindex' => ++$tabindex,
- ];
+ ] );
- $diffConfig = OOUI\Element::configFromHtmlAttributes( $attribs );
$buttons['diff'] = new OOUI\ButtonInputWidget( [
+ 'name' => 'wpDiff',
+ 'tabIndex' => ++$tabindex,
'id' => 'wpDiffWidget',
'inputId' => 'wpDiff',
// Support: IE 6 – Use <input>, otherwise it can't distinguish which button was clicked
'type' => 'submit',
'title' => Linker::titleAttrib( 'diff' ),
'accessKey' => Linker::accesskey( 'diff' ),
- ] + $diffConfig );
+ ] );
// Avoid PHP 7.1 warning of passing $this by reference
$editPage = $this;