From f03ace27c74d1107b5521414434e84c779b3dadf Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Wed, 2 May 2007 16:47:06 +0000 Subject: [PATCH] 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. --- includes/SpecialUndelete.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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(), -- 2.20.1