Merge "PostgreSQL: Improve dropping of foreign key constraint"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Feb 2015 17:02:38 +0000 (17:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Feb 2015 17:02:39 +0000 (17:02 +0000)
includes/jobqueue/jobs/RecentChangesUpdateJob.php
includes/skins/Skin.php
includes/skins/SkinTemplate.php

index 236b4d4..b54ecfd 100644 (file)
@@ -76,6 +76,8 @@ class RecentChangesUpdateJob extends Job {
                        if ( $rcIds ) {
                                $dbw->delete( 'recentchanges', array( 'rc_id' => $rcIds ), __METHOD__ );
                        }
+                       // No need for this to be in a transaction.
+                       $dbw->commit( __METHOD__, 'flush' );
                } while ( $rcIds );
 
                $dbw->unlock( $lockKey, __METHOD__ );
index 6cc139b..c858cfa 100644 (file)
@@ -656,7 +656,7 @@ abstract class Skin extends ContextSource {
                $action = $this->getRequest()->getVal( 'action', 'view' );
 
                if ( $this->getTitle()->userCan( 'deletedhistory', $this->getUser() ) &&
-                       ( $this->getTitle()->getArticleID() == 0 || $action == 'history' ) ) {
+                       ( !$this->getTitle()->exists() || $action == 'history' ) ) {
                        $n = $this->getTitle()->isDeleted();
 
                        if ( $n ) {
@@ -1166,7 +1166,7 @@ abstract class Skin extends ContextSource {
 
                return array(
                        'href' => $title->getLocalURL( $urlaction ),
-                       'exists' => $title->getArticleID() != 0,
+                       'exists' => $title->isKnown(),
                );
        }
 
index 45a1a8b..8136d8e 100644 (file)
@@ -743,17 +743,20 @@ class SkinTemplate extends Skin {
                self::checkTitle( $title, $name );
                return array(
                        'href' => $title->getLocalURL( $urlaction ),
-                       'exists' => $title->getArticleID() != 0,
+                       'exists' => $title->isKnown(),
                );
        }
 
+       /**
+        * @todo is this even used?
+        */
        function makeArticleUrlDetails( $name, $urlaction = '' ) {
                $title = Title::newFromText( $name );
                $title = $title->getSubjectPage();
                self::checkTitle( $title, $name );
                return array(
                        'href' => $title->getLocalURL( $urlaction ),
-                       'exists' => $title->getArticleID() != 0,
+                       'exists' => $title->exists(),
                );
        }
 
@@ -1213,7 +1216,7 @@ class SkinTemplate extends Skin {
                                'href' => $this->getTitle()->getLocalURL( "action=info" )
                        );
 
-                       if ( $this->getTitle()->getArticleID() ) {
+                       if ( $this->getTitle()->exists() ) {
                                $nav_urls['recentchangeslinked'] = array(
                                        'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalURL()
                                );