EditPage: Allow the 'save' button's label to be 'publish' for public wikis
Default remains 'save xyz', at least for now. Bug: T131132 Change-Id: I56634ed223778a0650cf36ac7256151b13c494f1
This commit is contained in:
parent
347ec33528
commit
74fa6071c2
2 changed files with 15 additions and 1 deletions
|
|
@ -3195,6 +3195,15 @@ $wgHTMLFormAllowTableFormat = true;
|
||||||
*/
|
*/
|
||||||
$wgUseMediaWikiUIEverywhere = false;
|
$wgUseMediaWikiUIEverywhere = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Whether to label the store-to-database-and-show-to-others button in the editor
|
||||||
|
* as "Save page"/"Save changes" if false (the default) or, if true, instead as
|
||||||
|
* "Publish page"/"Publish changes".
|
||||||
|
*
|
||||||
|
* @since 1.28
|
||||||
|
*/
|
||||||
|
$wgEditButtonPublishNotSave = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permit other namespaces in addition to the w3.org default.
|
* Permit other namespaces in addition to the w3.org default.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -4032,7 +4032,12 @@ HTML
|
||||||
public function getEditButtons( &$tabindex ) {
|
public function getEditButtons( &$tabindex ) {
|
||||||
$buttons = [];
|
$buttons = [];
|
||||||
|
|
||||||
|
$labelAsPublish = $this->mArticle->getContext()->getConfig()->get( 'EditButtonPublishNotSave' );
|
||||||
|
if ( $labelAsPublish ) {
|
||||||
|
$buttonLabelKey = $this->isNew ? 'publishpage' : 'publishchanges';
|
||||||
|
} else {
|
||||||
$buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges';
|
$buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges';
|
||||||
|
}
|
||||||
$buttonLabel = wfMessage( $buttonLabelKey )->text();
|
$buttonLabel = wfMessage( $buttonLabelKey )->text();
|
||||||
$attribs = [
|
$attribs = [
|
||||||
'id' => 'wpSave',
|
'id' => 'wpSave',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue