Merge "Make HashBagOStuff::lock() compatible with BagOStuff::lock"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 23 Feb 2015 15:01:52 +0000 (15:01 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 23 Feb 2015 15:01:52 +0000 (15:01 +0000)
RELEASE-NOTES-1.25
docs/hooks.txt
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryWatchlist.php
includes/content/ContentHandler.php
includes/diff/DifferenceEngine.php

index cdef220..466a786 100644 (file)
@@ -274,6 +274,8 @@ production.
 * The following classes have been deprecated and may be removed in a future
   release:
   * ApiQueryDeletedrevs
+* Default type param for ApiQueryWatchlist and ApiQueryRecentChanges has
+  been changed from all types (e.g. including 'external') to 'edit|new|log'.
 
 === Languages updated in 1.25 ===
 
index a88803b..e81637a 100644 (file)
@@ -1057,6 +1057,15 @@ $title: the diff page title (nullable)
 $old: the ?old= param value from the url
 $new: the ?new= param value from the url
 
+'GetDifferenceEngine': Called when getting a new difference engine interface object
+Return false for valid object in $differenceEngine or true for the default difference engine
+$context: IContextSource context to be used for diff
+$old: Revision ID to show and diff with
+$new: Either a revision ID or one of the strings 'cur', 'prev' or 'next'
+$refreshCache: If set, refreshes the diff cache
+$unhide: If set, allow viewing deleted revs
+&$differenceEngine: output parameter, difference engine object to be used for diff
+
 'DiffRevisionTools': Override or extend the revision tools available from the
 diff view, i.e. undo, etc.
 $newRev: Revision object of the "new" revision
index fd73afb..bfdc5ab 100644 (file)
@@ -688,6 +688,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                                ApiBase::PARAM_MAX2 => ApiBase::LIMIT_BIG2
                        ),
                        'type' => array(
+                               ApiBase::PARAM_DFLT => 'edit|new|log',
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => array(
                                        'edit',
index 2cea1a6..11008cf 100644 (file)
@@ -499,6 +499,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                                )
                        ),
                        'type' => array(
+                               ApiBase::PARAM_DFLT => 'edit|new|log',
                                ApiBase::PARAM_ISMULTI => true,
                                ApiBase::PARAM_TYPE => array(
                                        'edit',
index 8c806c6..371b267 100644 (file)
@@ -626,8 +626,15 @@ abstract class ContentHandler {
        public function createDifferenceEngine( IContextSource $context, $old = 0, $new = 0,
                $rcid = 0, //FIXME: Deprecated, no longer used
                $refreshCache = false, $unhide = false ) {
-               $diffEngineClass = $this->getDiffEngineClass();
 
+               // hook: get difference engine
+               $differenceEngine = null;
+               if ( !wfRunHooks( 'GetDifferenceEngine',
+                       array( $context, $old, $new, $refreshCache, $unhide, &$differenceEngine )
+               ) ) {
+                       return $differenceEngine;
+               }
+               $diffEngineClass = $this->getDiffEngineClass();
                return new $diffEngineClass( $context, $old, $new, $rcid, $refreshCache, $unhide );
        }
 
index 1bd2092..a0e1a96 100644 (file)
@@ -94,6 +94,10 @@ class DifferenceEngine extends ContextSource {
 
        /** @var bool Show rev_deleted content if allowed */
        protected $unhide = false;
+
+       /** @var bool Refresh the diff cache */
+       protected $mRefreshCache = false;
+
        /**#@-*/
 
        /**