Calling this method "SaveButton" is misleading since this function
controls whether the button is called "save" or "publish". The
corresponding config option (EditSubmitButtonLabelPublish) already uses
the terminology "SubmitButton" so re-use it here.
And make it protected so subclasses (e.g. TwoColConflict) can use it
instead of having to re-implement it.
Change-Id: Iae811f0487f661bb501a9893037c352efa4e1e73
- $buttonLabel = $this->context->msg( $this->getSaveButtonLabel() )->text();
+ $buttonLabel = $this->context->msg( $this->getSubmitButtonLabel() )->text();
if ( $this->missingComment ) {
$out->wrapWikiMsg( "<div id='mw-missingcommenttext'>\n$1\n</div>", 'missingcommenttext' );
if ( $this->missingComment ) {
$out->wrapWikiMsg( "<div id='mw-missingcommenttext'>\n$1\n</div>", 'missingcommenttext' );
- private function getSaveButtonLabel() {
+ protected function getSubmitButtonLabel() {
- $this->mArticle->getContext()->getConfig()->get( 'EditSubmitButtonLabelPublish' );
+ $this->context->getConfig()->get( 'EditSubmitButtonLabelPublish' );
// Can't use $this->isNew as that's also true if we're adding a new section to an extant page
$newPage = !$this->mTitle->exists();
// Can't use $this->isNew as that's also true if we're adding a new section to an extant page
$newPage = !$this->mTitle->exists();
public function getEditButtons( &$tabindex ) {
$buttons = [];
public function getEditButtons( &$tabindex ) {
$buttons = [];
- $buttonLabel = $this->context->msg( $this->getSaveButtonLabel() )->text();
+ $buttonLabel = $this->context->msg( $this->getSubmitButtonLabel() )->text();
$attribs = [
'name' => 'wpSave',
$attribs = [
'name' => 'wpSave',
protected function addExplainConflictHeader( OutputPage $out ) {
$out->wrapWikiMsg(
"<div class='mw-explainconflict'>\n$1\n</div>",
protected function addExplainConflictHeader( OutputPage $out ) {
$out->wrapWikiMsg(
"<div class='mw-explainconflict'>\n$1\n</div>",
- [ 'explainconflict', $this->context->msg( $this->getSaveButtonLabel() )->text() ]
+ [ 'explainconflict', $this->context->msg( $this->getSubmitButtonLabel() )->text() ]