Index: trunk/phase3/maintenance/rebuildrecentchanges.php |
— | — | @@ -31,8 +31,6 @@ |
32 | 32 | } |
33 | 33 | |
34 | 34 | public function execute() { |
35 | | - global $wgTitle; |
36 | | - $wgTitle = Title::newFromText( "Rebuild recent changes script" ); |
37 | 35 | $this->rebuildRecentChangesTablePass1(); |
38 | 36 | $this->rebuildRecentChangesTablePass2(); |
39 | 37 | $this->rebuildRecentChangesTablePass3(); |
— | — | @@ -137,10 +135,16 @@ |
138 | 136 | $size = $dbw->selectField( 'revision', 'rev_len', array( 'rev_id' => $obj->rc_this_oldid ) ); |
139 | 137 | $size = !is_null( $size ) ? intval( $size ) : 'NULL'; |
140 | 138 | |
141 | | - $sql3 = "UPDATE $recentchanges SET rc_last_oldid=$lastOldId,rc_new=$new,rc_type=$new," . |
142 | | - "rc_old_len=$lastSize,rc_new_len=$size " . |
143 | | - "WHERE rc_cur_id={$lastCurId} AND rc_this_oldid={$obj->rc_this_oldid}"; |
144 | | - $dbw->query( $sql3 ); |
| 139 | + $dbw->update( 'recentchanges', |
| 140 | + array( |
| 141 | + 'rc_old_len' => $lastSize, |
| 142 | + 'rc_new_len' => $size, |
| 143 | + ), array( |
| 144 | + 'rc_cur_id' => $lastCurId, |
| 145 | + 'rc_this_oldid' => $obj->rc_this_oldid, |
| 146 | + ), |
| 147 | + __METHOD__ |
| 148 | + ); |
145 | 149 | |
146 | 150 | $lastOldId = intval( $obj->rc_this_oldid ); |
147 | 151 | $lastSize = $size; |