Followup r70608, don't use master connection just for type check, and use getType...
authorChad Horohoe <demon@users.mediawiki.org>
Sun, 19 Sep 2010 23:25:57 +0000 (23:25 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sun, 19 Sep 2010 23:25:57 +0000 (23:25 +0000)
includes/Block.php
includes/Revision.php

index 59ec8c0..d5169ef 100644 (file)
@@ -861,8 +861,8 @@ class Block {
                        # BEGIN DatabaseMssql hack
                        # Since MSSQL doesn't recognize the infinity keyword, set date manually.
                        # TO-DO: Refactor for better DB portability and remove magic date
-                       $dbw = wfGetDB( DB_MASTER );
-                       if ( $dbw instanceof DatabaseMssql ) {
+                       $dbr = wfGetDB( DB_SLAVE );
+                       if ( $dbr->getType() == 'mssql' ) {
                                return '3000-01-31 00:00:00.000';
                        }
                        # End DatabaseMssql hack
index 54709de..5145033 100644 (file)
@@ -314,8 +314,8 @@ class Revision {
 
                        if( isset( $row->page_latest ) ) {
                                $this->mCurrent = ( $row->rev_id == $row->page_latest );
-                               $this->mTitle = Title::makeTitle( $row->page_namespace, $row->page_title );
-                               $this->mTitle->resetArticleID( $this->mPage );
+                               $row->page_id = $this->mPage;
+                               $this->mTitle = Title::newFromRow( $row );
                        } else {
                                $this->mCurrent = false;
                                $this->mTitle = null;