Index: trunk/extensions/FlaggedRevs/FRDependencyUpdate.php |
— | — | @@ -18,7 +18,6 @@ |
19 | 19 | $this->sTemplates = $stableOutput->getTemplates(); |
20 | 20 | $this->sImages = $stableOutput->getImages(); |
21 | 21 | $this->sCategories = $stableOutput->getCategories(); |
22 | | - $this->dbw = wfGetDB( DB_MASTER ); |
23 | 22 | } |
24 | 23 | |
25 | 24 | public function doUpdate() { |
— | — | @@ -62,13 +61,14 @@ |
63 | 62 | $existing = $this->getExistingDeps( FR_MASTER ); |
64 | 63 | $insertions = $this->getDepInsertions( $existing, $deps ); |
65 | 64 | $deletions = $this->getDepDeletions( $existing, $deps ); |
| 65 | + $dbw = wfGetDB( DB_MASTER ); |
66 | 66 | # Delete removed links |
67 | 67 | if ( $deletions ) { |
68 | | - $this->dbw->delete( 'flaggedrevs_tracking', $deletions, __METHOD__ ); |
| 68 | + $dbw->delete( 'flaggedrevs_tracking', $deletions, __METHOD__ ); |
69 | 69 | } |
70 | 70 | # Add any new links |
71 | 71 | if ( $insertions ) { |
72 | | - $this->dbw->insert( 'flaggedrevs_tracking', $insertions, __METHOD__, 'IGNORE' ); |
| 72 | + $dbw->insert( 'flaggedrevs_tracking', $insertions, __METHOD__, 'IGNORE' ); |
73 | 73 | } |
74 | 74 | } |
75 | 75 | } |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | } |
135 | 135 | } |
136 | 136 | if ( $del ) { |
137 | | - $clause = self::makeWhereFrom2d( $del, $this->dbw ); |
| 137 | + $clause = self::makeWhereFrom2d( $del, wfGetDB( DB_MASTER ) ); |
138 | 138 | $where = array( $clause, 'ftr_from' => $this->title->getArticleId() ); |
139 | 139 | } else { |
140 | 140 | $where = false; |