Remove unused variable $user from SkinTemplate::outputPage()
[lhc/web/wiklou.git] / includes / WikiPage.php
index f8277e0..0d987aa 100644 (file)
@@ -2017,6 +2017,11 @@ class WikiPage implements Page, IDBAccessObject {
                $user = is_null( $user ) ? $wgUser : $user;
                //XXX: check $user->getId() here???
 
+               // Use a sane default for $serialization_format, see bug 57026
+               if ( $serialization_format === null ) {
+                       $serialization_format = $content->getContentHandler()->getDefaultFormat();
+               }
+
                if ( $this->mPreparedEdit
                        && $this->mPreparedEdit->newContent
                        && $this->mPreparedEdit->newContent->equals( $content )
@@ -2254,8 +2259,8 @@ class WikiPage implements Page, IDBAccessObject {
                        return Status::newFatal( 'readonlytext', wfReadOnlyReason() );
                }
 
+               $this->loadPageData( 'fromdbmaster' );
                $restrictionTypes = $this->mTitle->getRestrictionTypes();
-
                $id = $this->getId();
 
                if ( !$cascade ) {