Merge "cdb: One class per file"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 10 Nov 2014 19:13:07 +0000 (19:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 10 Nov 2014 19:13:07 +0000 (19:13 +0000)
includes/WatchedItem.php
includes/api/ApiQueryBlocks.php
includes/cache/MessageCache.php
includes/context/RequestContext.php
includes/parser/LinkHolderArray.php
includes/parser/Parser.php
languages/i18n/en.json

index ab136b8..fbd6119 100644 (file)
@@ -401,7 +401,8 @@ class WatchedItem {
                $newtitle = $nt->getDBkey();
 
                $dbw = wfGetDB( DB_MASTER );
-               $res = $dbw->select( 'watchlist', 'wl_user',
+               $res = $dbw->select( 'watchlist',
+                       array( 'wl_user', 'wl_notificationtimestamp' ),
                        array( 'wl_namespace' => $oldnamespace, 'wl_title' => $oldtitle ),
                        __METHOD__, 'FOR UPDATE'
                );
@@ -411,7 +412,8 @@ class WatchedItem {
                        $values[] = array(
                                'wl_user' => $s->wl_user,
                                'wl_namespace' => $newnamespace,
-                               'wl_title' => $newtitle
+                               'wl_title' => $newtitle,
+                               'wl_notificationtimestamp' => $s->wl_notificationtimestamp,
                        );
                }
 
index 5c44173..b7779a7 100644 (file)
  */
 class ApiQueryBlocks extends ApiQueryBase {
 
-       /**
-        * @var array
-        */
-       protected $usernames;
-
        public function __construct( ApiQuery $query, $moduleName ) {
                parent::__construct( $query, $moduleName, 'bk' );
        }
@@ -102,10 +97,11 @@ class ApiQueryBlocks extends ApiQueryBase {
                        $this->addWhereFld( 'ipb_id', $params['ids'] );
                }
                if ( isset( $params['users'] ) ) {
+                       $usernames = array();
                        foreach ( (array)$params['users'] as $u ) {
-                               $this->prepareUsername( $u );
+                               $usernames[] = $this->prepareUsername( $u );
                        }
-                       $this->addWhereFld( 'ipb_address', $this->usernames );
+                       $this->addWhereFld( 'ipb_address', $usernames );
                        $this->addWhereFld( 'ipb_auto', 0 );
                }
                if ( isset( $params['ip'] ) ) {
@@ -264,7 +260,7 @@ class ApiQueryBlocks extends ApiQueryBase {
                if ( $name === false ) {
                        $this->dieUsage( "User name {$user} is not valid", 'param_user' );
                }
-               $this->usernames[] = $name;
+               return $name;
        }
 
        public function getAllowedParams() {
index 6face4f..43e00cd 100644 (file)
@@ -1059,6 +1059,7 @@ class MessageCache {
                wfProfileIn( __METHOD__ );
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
                        $title = $wgTitle;
                }
                // Sometimes $wgTitle isn't set either...
index 059f18c..d620be9 100644 (file)
@@ -140,7 +140,7 @@ class RequestContext implements IContextSource {
                if ( $this->title === null ) {
                        global $wgTitle; # fallback to $wg till we can improve this
                        $this->title = $wgTitle;
-                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetCaller() . ' with no title set.' );
+                       wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' . wfGetAllCallers() . ' with no title set.' );
                }
 
                return $this->title;
index 7794fae..6c15993 100644 (file)
@@ -267,17 +267,15 @@ class LinkHolderArray {
         * Replace <!--LINK--> link placeholders with actual links, in the buffer
         *
         * @param string $text
-        * @return array Array of link CSS classes, indexed by PDBK.
         */
        public function replace( &$text ) {
                wfProfileIn( __METHOD__ );
 
-               /** @todo FIXME: replaceInternal doesn't return a value */
-               $colours = $this->replaceInternal( $text );
+               $this->replaceInternal( $text );
                $this->replaceInterwiki( $text );
 
                wfProfileOut( __METHOD__ );
-               return $colours;
+
        }
 
        /**
index 07a104b..cd804b5 100644 (file)
@@ -5317,11 +5317,9 @@ class Parser {
         *
         * @param string $text
         * @param int $options
-        *
-        * @return array Array of link CSS classes, indexed by PDBK.
         */
        public function replaceLinkHolders( &$text, $options = 0 ) {
-               return $this->mLinkHolders->replace( $text );
+               $this->mLinkHolders->replace( $text );
        }
 
        /**
index 341f626..1ae928e 100644 (file)
        "movepage-moved-redirect": "A redirect has been created.",
        "movepage-moved-noredirect": "The creation of a redirect has been suppressed.",
        "articleexists": "A page of that name already exists, or the name you have chosen is not valid.\nPlease choose another name.",
-       "cantmove-titleprotected": "You cannot move a page to this location because the new title has been protected from creation",
+       "cantmove-titleprotected": "You cannot move a page to this location because the new title has been protected from creation.",
        "movetalk": "Move associated talk page",
        "move-subpages": "Move subpages (up to $1)",
        "move-talk-subpages": "Move subpages of talk page (up to $1)",
        "delete_and_move_confirm": "Yes, delete the page",
        "delete_and_move_reason": "Deleted to make way for move from \"[[$1]]\"",
        "selfmove": "Source and destination titles are the same;\ncannot move a page over itself.",
-       "immobile-source-namespace": "Cannot move pages in namespace \"$1\"",
-       "immobile-target-namespace": "Cannot move pages into namespace \"$1\"",
+       "immobile-source-namespace": "Cannot move pages in namespace \"$1\".",
+       "immobile-target-namespace": "Cannot move pages into namespace \"$1\".",
        "immobile-target-namespace-iw": "Interwiki link is not a valid target for page move.",
        "immobile-source-page": "This page is not movable.",
        "immobile-target-page": "Cannot move to that destination title.",
        "bad-target-model": "The desired destination uses a different content model. Cannot convert from $1 to $2.",
-       "imagenocrossnamespace": "Cannot move file to non-file namespace",
-       "nonfile-cannot-move-to-file": "Cannot move non-file to file namespace",
-       "imagetypemismatch": "The new file extension does not match its type",
-       "imageinvalidfilename": "The target filename is invalid",
+       "imagenocrossnamespace": "Cannot move file to non-file namespace.",
+       "nonfile-cannot-move-to-file": "Cannot move non-file to file namespace.",
+       "imagetypemismatch": "The new file extension does not match its type.",
+       "imageinvalidfilename": "The target filename is invalid.",
        "fix-double-redirects": "Update any redirects that point to the original title",
        "move-leave-redirect": "Leave a redirect behind",
        "protectedpagemovewarning": "<strong>Warning:</strong> This page has been protected so that only users with administrator privileges can move it.\nThe latest log entry is provided below for reference:",