Moved definitions for Special:Listadmins and Special:Listbots just below Special...
[lhc/web/wiklou.git] / includes / Revision.php
index eeae08b..31814fe 100644 (file)
@@ -601,6 +601,7 @@ class Revision {
        /**
         * Alias for getText(Revision::FOR_THIS_USER)
         *
+        * @deprecated
         * @return String
         */
        public function revText() {
@@ -750,7 +751,9 @@ class Revision {
                        }
 
                        global $wgLegacyEncoding;
-                       if( $wgLegacyEncoding && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) {
+                       if( $text !== false && $wgLegacyEncoding 
+                               && !in_array( 'utf-8', $flags ) && !in_array( 'utf8', $flags ) ) 
+                       {
                                # Old revisions kept around in a legacy encoding?
                                # Upconvert on demand.
                                # ("utf8" checked for compatibility with some broken
@@ -833,6 +836,8 @@ class Revision {
                        $this->mTextId = $dbw->insertId();
                }
 
+               if ( $this->mComment === null ) $this->mComment = "";
+
                # Record the edit in revisions
                $rev_id = isset( $this->mId )
                        ? $this->mId