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

Revision: 62148
Author:   tstarling
Date:     2010-02-09 00:57:07 +0000 (Tue, 09 Feb 2010)

Log Message:
-----------
Bug fix: bt_page and bt_rev_id should be 0 for orphans, not null.

Modified Paths:
--------------
    trunk/phase3/maintenance/storage/fixBug20757.php

Modified: trunk/phase3/maintenance/storage/fixBug20757.php
===================================================================
--- trunk/phase3/maintenance/storage/fixBug20757.php    2010-02-09 00:23:09 UTC 
(rev 62147)
+++ trunk/phase3/maintenance/storage/fixBug20757.php    2010-02-09 00:57:07 UTC 
(rev 62148)
@@ -159,14 +159,14 @@
 
                                // Find the page_id and rev_id
                                // The page is probably the same as the page of 
the secondary row
-                               $pageId = $trackRow->bt_page;
-                               if ( $pageId === null ) {
-                                       $revId = null;
+                               $pageId = intval( $trackRow->bt_page );
+                               if ( !$pageId ) {
+                                       $revId = $pageId = 0;
                                } else {
                                        $revId = $this->findTextIdInPage( 
$pageId, $primaryId );
-                                       if ( $revId === null ) {
+                                       if ( !$revId ) {
                                                // Actually an orphan
-                                               $pageId = null;
+                                               $pageId = $revId = 0;
                                        }
                                }
 
@@ -189,7 +189,7 @@
                                        // without needing to run 
trackBlobs.php again
                                        $dbw->insert( 'blob_tracking',
                                                array(
-                                                       'bt_page' => 
$trackRow->bt_page,
+                                                       'bt_page' => $pageId,
                                                        'bt_rev_id' => $revId,
                                                        'bt_text_id' => 
$primaryId,
                                                        'bt_cluster' => 
$trackRow->bt_cluster,



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to