Merge "API: Allow to pass whitespaces in MultiValue"
[lhc/web/wiklou.git] / includes / api / ApiSetPageLanguage.php
old mode 100755 (executable)
new mode 100644 (file)
index 2d6d9be..40826ae
@@ -1,9 +1,5 @@
 <?php
 /**
- *
- *
- * Created on January 1, 2017
- *
  * Copyright © 2017 Justin Du "<justin.d128@gmail.com>"
  *
  * This program is free software; you can redistribute it and/or modify
  */
 class ApiSetPageLanguage extends ApiBase {
        // Check if change language feature is enabled
-       protected function getDescriptionMessage() {
+       protected function getExtendedDescription() {
                if ( !$this->getConfig()->get( 'PageLanguageUseDB' ) ) {
-                       return 'apihelp-setpagelanguage-description-disabled';
+                       return 'apihelp-setpagelanguage-extended-description-disabled';
                }
-               return parent::getDescriptionMessage();
+               return parent::getExtendedDescription();
        }
 
        /**
@@ -73,7 +69,7 @@ class ApiSetPageLanguage extends ApiBase {
 
                // If change tagging was requested, check that the user is allowed to tag,
                // and the tags are valid
-               if ( count( $params['tags'] ) ) {
+               if ( $params['tags'] ) {
                        $tagStatus = ChangeTags::canAddTagsAccompanyingChange( $params['tags'], $user );
                        if ( !$tagStatus->isOK() ) {
                                $this->dieStatus( $tagStatus );