http://www.mediawiki.org/wiki/Special:Code/MediaWiki/73348

Revision: 73348
Author:   demon
Date:     2010-09-19 23:25:57 +0000 (Sun, 19 Sep 2010)

Log Message:
-----------
Followup r70608, don't use master connection just for type check, and use 
getType() instead of instanceof

Modified Paths:
--------------
    trunk/phase3/includes/Block.php
    trunk/phase3/includes/Revision.php

Modified: trunk/phase3/includes/Block.php
===================================================================
--- trunk/phase3/includes/Block.php     2010-09-19 23:17:21 UTC (rev 73347)
+++ trunk/phase3/includes/Block.php     2010-09-19 23:25:57 UTC (rev 73348)
@@ -861,8 +861,8 @@
                        # 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

Modified: trunk/phase3/includes/Revision.php
===================================================================
--- trunk/phase3/includes/Revision.php  2010-09-19 23:17:21 UTC (rev 73347)
+++ trunk/phase3/includes/Revision.php  2010-09-19 23:25:57 UTC (rev 73348)
@@ -314,8 +314,8 @@
 
                        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;



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to