Merge "Update OOUI to v0.29.1"
[lhc/web/wiklou.git] / includes / Revision.php
index 1e35dda..e45c6dc 100644 (file)
@@ -691,7 +691,7 @@ class Revision implements IDBAccessObject {
         * @return SlotRecord
         */
        private function getMainSlotRaw() {
-               return $this->mRecord->getSlot( 'main', RevisionRecord::RAW );
+               return $this->mRecord->getSlot( SlotRecord::MAIN, RevisionRecord::RAW );
        }
 
        /**
@@ -926,7 +926,7 @@ class Revision implements IDBAccessObject {
                }
 
                try {
-                       return $this->mRecord->getContent( 'main', $audience, $user );
+                       return $this->mRecord->getContent( SlotRecord::MAIN, $audience, $user );
                }
                catch ( RevisionAccessException $e ) {
                        return null;
@@ -1179,7 +1179,7 @@ class Revision implements IDBAccessObject {
 
                $rec = self::getRevisionStore()->newNullRevision( $dbw, $title, $comment, $minor, $user );
 
-               return new Revision( $rec );
+               return $rec ? new Revision( $rec ) : null;
        }
 
        /**