From: Tim Starling Date: Wed, 2 May 2007 16:47:06 +0000 (+0000) Subject: Removed PostgreSQL-specific hack. It does support FOR UPDATE, and if it didn't, the... X-Git-Tag: 1.31.0-rc.0~53122 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=f03ace27c74d1107b5521414434e84c779b3dadf;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index 8e740f6dca..c31709b7c9 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -319,8 +319,6 @@ class PageArchive { * @return int number of revisions restored */ private function undeleteRevisions( $timestamps ) { - global $wgDBtype; - $restoreAll = empty( $timestamps ); $dbw = wfGetDB( DB_MASTER ); @@ -328,9 +326,7 @@ class PageArchive { # Does this page already exist? We'll have to update it... $article = new Article( $this->title ); - $options = ( $wgDBtype == 'postgres' ) - ? '' // pg doesn't support this? - : 'FOR UPDATE'; + $options = 'FOR UPDATE'; $page = $dbw->selectRow( 'page', array( 'page_id', 'page_latest' ), array( 'page_namespace' => $this->title->getNamespace(),