From: jenkins-bot Date: Wed, 24 Aug 2016 00:17:38 +0000 (+0000) Subject: Merge "EditPage: Allow the 'save' button's label to be 'publish' for public wikis" X-Git-Tag: 1.31.0-rc.0~5922 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/ajouter.php?a=commitdiff_plain;h=47437e0653542aae57ea456b24486efb48ee8aac;hp=99dbf4e1d4d7f18e02935bdb8cd3be4413ffe729;p=lhc%2Fweb%2Fwiklou.git Merge "EditPage: Allow the 'save' button's label to be 'publish' for public wikis" --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index cad1f63409..e15c98834a 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -3193,6 +3193,15 @@ $wgHTMLFormAllowTableFormat = true; */ $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. * diff --git a/includes/EditPage.php b/includes/EditPage.php index da35fb5362..c7b014a7ff 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -4050,7 +4050,12 @@ HTML public function getEditButtons( &$tabindex ) { $buttons = []; - $buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges'; + $labelAsPublish = $this->mArticle->getContext()->getConfig()->get( 'EditButtonPublishNotSave' ); + if ( $labelAsPublish ) { + $buttonLabelKey = $this->isNew ? 'publishpage' : 'publishchanges'; + } else { + $buttonLabelKey = $this->isNew ? 'savearticle' : 'savechanges'; + } $buttonLabel = wfMessage( $buttonLabelKey )->text(); $attribs = [ 'id' => 'wpSave',