Index: trunk/phase3/maintenance/storage/fixBug20757.php |
— | — | @@ -159,14 +159,14 @@ |
160 | 160 | |
161 | 161 | // Find the page_id and rev_id |
162 | 162 | // The page is probably the same as the page of the secondary row |
163 | | - $pageId = $trackRow->bt_page; |
164 | | - if ( $pageId === null ) { |
165 | | - $revId = null; |
| 163 | + $pageId = intval( $trackRow->bt_page ); |
| 164 | + if ( !$pageId ) { |
| 165 | + $revId = $pageId = 0; |
166 | 166 | } else { |
167 | 167 | $revId = $this->findTextIdInPage( $pageId, $primaryId ); |
168 | | - if ( $revId === null ) { |
| 168 | + if ( !$revId ) { |
169 | 169 | // Actually an orphan |
170 | | - $pageId = null; |
| 170 | + $pageId = $revId = 0; |
171 | 171 | } |
172 | 172 | } |
173 | 173 | |
— | — | @@ -189,7 +189,7 @@ |
190 | 190 | // without needing to run trackBlobs.php again |
191 | 191 | $dbw->insert( 'blob_tracking', |
192 | 192 | array( |
193 | | - 'bt_page' => $trackRow->bt_page, |
| 193 | + 'bt_page' => $pageId, |
194 | 194 | 'bt_rev_id' => $revId, |
195 | 195 | 'bt_text_id' => $primaryId, |
196 | 196 | 'bt_cluster' => $trackRow->bt_cluster, |