Merge "Parse "retrievedfrom" and "lastmodifiedat""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 18 Feb 2015 17:16:18 +0000 (17:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 18 Feb 2015 17:16:18 +0000 (17:16 +0000)
includes/installer/PostgresUpdater.php
includes/skins/Skin.php
includes/skins/SkinTemplate.php

index 9e41276..6ac5436 100644 (file)
@@ -384,8 +384,6 @@ class PostgresUpdater extends DatabaseUpdater {
                                'page(page_id) ON DELETE CASCADE' ),
                        array( 'changeFkeyDeferrable', 'protected_titles', 'pt_user',
                                'mwuser(user_id) ON DELETE SET NULL' ),
-                       array( 'changeFkeyDeferrable', 'recentchanges', 'rc_cur_id',
-                               'page(page_id) ON DELETE SET NULL' ),
                        array( 'changeFkeyDeferrable', 'recentchanges', 'rc_user',
                                'mwuser(user_id) ON DELETE SET NULL' ),
                        array( 'changeFkeyDeferrable', 'redirect', 'rd_from', 'page(page_id) ON DELETE CASCADE' ),
@@ -789,7 +787,7 @@ END;
                        $command = "ALTER TABLE $table DROP CONSTRAINT $conname";
                        $this->db->query( $command );
                } else {
-                       $this->output( "Foreign key constraint on '$table.$field' already does not exist\n" );
+                       $this->output( "...foreign key constraint on '$table.$field' already does not exist\n" );
                };
        }
 
index 3d45d7d..244a278 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()
                                );