Removed PostgreSQL-specific hack. It does support FOR UPDATE, and if it didn't, the...
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 2 May 2007 16:47:06 +0000 (16:47 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 2 May 2007 16:47:06 +0000 (16:47 +0000)
includes/SpecialUndelete.php

index 8e740f6..c31709b 100644 (file)
@@ -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(),