Index: trunk/extensions/CodeReview/CodeRevision.php |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | } |
129 | 129 | |
130 | 130 | function saveComment( $text, $review, $parent=null ) { |
131 | | - $dbw = wfGetDB( DB_SLAVE ); |
| 131 | + $dbw = wfGetDB( DB_MASTER ); |
132 | 132 | $data = $this->commentData( $text, $review, $parent ); |
133 | 133 | $data['cc_id'] = $dbw->nextSequenceValue( 'code_comment_cc_id' ); |
134 | 134 | $dbw->insert( 'code_comment', |
— | — | @@ -139,7 +139,7 @@ |
140 | 140 | |
141 | 141 | protected function commentData( $text, $review, $parent=null ) { |
142 | 142 | global $wgUser; |
143 | | - $dbw = wfGetDB( DB_SLAVE ); |
| 143 | + $dbw = wfGetDB( DB_MASTER ); |
144 | 144 | $ts = wfTimestamp( TS_MW ); |
145 | 145 | $sortkey = $this->threadedSortkey( $parent, $ts ); |
146 | 146 | return array( |
— | — | @@ -158,7 +158,7 @@ |
159 | 159 | if( $parent ) { |
160 | 160 | // We construct a threaded sort key by concatenating the timestamps |
161 | 161 | // of all our parent comments |
162 | | - $dbw = wfGetDB( DB_SLAVE ); |
| 162 | + $dbw = wfGetDB( DB_MASTER ); |
163 | 163 | $parentKey = $dbw->selectField( 'code_comment', |
164 | 164 | 'cc_sortkey', |
165 | 165 | array( 'cc_id' => $parent ), |