r21802 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r21801‎ | r21802 | r21803 >
Date:16:47, 2 May 2007
Author:tstarling
Status:old
Tags:
Comment:
Removed PostgreSQL-specific hack. It does support FOR UPDATE, and if it didn't, the correct place to deal with it would be in DatabasePostgres::makeSelectOptions(), not scattered throughout the code.
Modified paths:
  • /trunk/phase3/includes/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialUndelete.php
@@ -319,8 +319,6 @@
320320 * @return int number of revisions restored
321321 */
322322 private function undeleteRevisions( $timestamps ) {
323 - global $wgDBtype;
324 -
325323 $restoreAll = empty( $timestamps );
326324
327325 $dbw = wfGetDB( DB_MASTER );
@@ -328,9 +326,7 @@
329327
330328 # Does this page already exist? We'll have to update it...
331329 $article = new Article( $this->title );
332 - $options = ( $wgDBtype == 'postgres' )
333 - ? '' // pg doesn't support this?
334 - : 'FOR UPDATE';
 330+ $options = 'FOR UPDATE';
335331 $page = $dbw->selectRow( 'page',
336332 array( 'page_id', 'page_latest' ),
337333 array( 'page_namespace' => $this->title->getNamespace(),