Minor code cleanup and a doc type cleanup
authorYuri Astrakhan <yurik@wikimedia.org>
Thu, 25 Sep 2014 02:13:19 +0000 (22:13 -0400)
committerYuri Astrakhan <yurik@wikimedia.org>
Thu, 25 Sep 2014 02:13:19 +0000 (22:13 -0400)
Change-Id: Ib89226a83738d1205405eac3926bfaa578966133

includes/EditPage.php
includes/Status.php

index a9925ff..8a55b1d 100644 (file)
@@ -2230,11 +2230,7 @@ class EditPage {
         *   $this->allowNonTextContent is not true.
         */
        protected function toEditText( $content ) {
-               if ( $content === null || $content === false ) {
-                       return $content;
-               }
-
-               if ( is_string( $content ) ) {
+               if ( $content === null || $content === false || is_string( $content ) ) {
                        return $content;
                }
 
index 1a72968..2a9d173 100644 (file)
@@ -184,9 +184,9 @@ class Status {
        /**
         * Get the error list as a wikitext formatted list
         *
-        * @param string $shortContext A short enclosing context message name, to
+        * @param string|bool $shortContext A short enclosing context message name, to
         *        be used when there is a single error
-        * @param string $longContext A long enclosing context message name, for a list
+        * @param string|bool $longContext A long enclosing context message name, for a list
         * @return string
         */
        public function getWikiText( $shortContext = false, $longContext = false ) {