Merge "EditPage: Allow the 'save' button's label to be 'publish' for public wikis"
[lhc/web/wiklou.git] / includes / EditPage.php
index da35fb5..c7b014a 100644 (file)
@@ -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',