jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build - 28/02/2014 10:00
......................................................................


New Wikidata Build - 28/02/2014 10:00

Change-Id: I4b7dd2a51730f6cde45d11b638fc6da8273655d7
---
D .gitignore
D .gitreview
M composer.lock
M extensions/Wikibase/client/tests/phpunit/ClientDefaultsTest.php
M extensions/Wikibase/lib/includes/StringNormalizer.php
M extensions/Wikibase/lib/includes/store/PropertyLabelResolver.php
M extensions/Wikibase/lib/includes/store/StorageException.php
M 
extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
M extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
M extensions/Wikibase/lib/resources/wikibase.css
M extensions/Wikibase/repo/includes/ContentRetriever.php
M extensions/Wikibase/repo/includes/actions/ViewEntityAction.php
M extensions/Wikibase/repo/resources/themes/default/wikibase.toc.css
M extensions/Wikibase/repo/resources/wikibase.ui.scrapeFormattedValues.js
M extensions/Wikibase/repo/tests/phpunit/includes/ContentRetrieverTest.php
M vendor/autoload.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
18 files changed, 222 insertions(+), 163 deletions(-)

Approvals:
  WikidataJenkins: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 98b092a..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-.svn
-*~
-*.kate-swp
-.*.swp
diff --git a/.gitreview b/.gitreview
deleted file mode 100644
index a165c57..0000000
--- a/.gitreview
+++ /dev/null
@@ -1,6 +0,0 @@
-[gerrit]
-host=gerrit.wikimedia.org
-port=29418
-project=mediawiki/extensions/Wikidata.git
-defaultbranch=master
-defaultrebase=0
diff --git a/composer.lock b/composer.lock
index e74c892..045b7af 100644
--- a/composer.lock
+++ b/composer.lock
@@ -391,7 +391,7 @@
                     "name": "Jeroen De Dauw",
                     "email": "jeroended...@gmail.com",
                     "homepage": "http://jeroendedauw.com";,
-                    "role": "Developer"
+                    "role": "Core developer"
                 },
                 {
                     "name": "Daniel Werner",
@@ -851,12 +851,12 @@
             "source": {
                 "type": "git",
                 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-                "reference": "adabc6623d832f19c57f9083e53299f0137ac4de"
+                "reference": "e78a231b6dbbda6b318032c59bbbbec7593cb321"
             },
             "dist": {
                 "type": "zip",
-                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/adabc6623d832f19c57f9083e53299f0137ac4de";,
-                "reference": "adabc6623d832f19c57f9083e53299f0137ac4de",
+                "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e78a231b6dbbda6b318032c59bbbbec7593cb321";,
+                "reference": "e78a231b6dbbda6b318032c59bbbbec7593cb321",
                 "shasum": ""
             },
             "require": {
@@ -915,7 +915,7 @@
                 "wikibaserepo",
                 "wikidata"
             ],
-            "time": "2014-02-26 22:06:03"
+            "time": "2014-02-28 09:25:49"
         }
     ],
     "packages-dev": [
diff --git a/extensions/Wikibase/client/tests/phpunit/ClientDefaultsTest.php 
b/extensions/Wikibase/client/tests/phpunit/ClientDefaultsTest.php
index 9b9e4b8..eb5de75 100644
--- a/extensions/Wikibase/client/tests/phpunit/ClientDefaultsTest.php
+++ b/extensions/Wikibase/client/tests/phpunit/ClientDefaultsTest.php
@@ -1,25 +1,17 @@
 <?php
- /**
- *
+
+namespace Wikibase\Test;
+
+use Wikibase\SettingsArray;
+
+/**
  * Copyright © 02.07.13 by the authors listed below.
- *
  * @license GPL 2+
  *
  * @group Wikibase
  * @group WikibaseClient
  *
  * @author Daniel Kinzler
- */
-
-
-namespace Wikibase\Test;
-
-
-use Wikibase\SettingsArray;
-
-/**
- * Class ClientDefaultsTest
- * @package Wikibase\Test
  */
 class ClientDefaultsTest extends \MediaWikiTestCase {
 
diff --git a/extensions/Wikibase/lib/includes/StringNormalizer.php 
b/extensions/Wikibase/lib/includes/StringNormalizer.php
index 28bae7c..a62c4ff 100644
--- a/extensions/Wikibase/lib/includes/StringNormalizer.php
+++ b/extensions/Wikibase/lib/includes/StringNormalizer.php
@@ -1,26 +1,19 @@
 <?php
- /**
- *
- * Copyright © 03.07.13 by the authors listed below.
- *
- * @license GPL 2+
- *
- * @author Daniel Kinzler
- * @author John Erling Blad < jeb...@gmail.com >
- */
-
 
 namespace Wikibase;
-
 
 use UtfNormal;
 
 /**
  * StringNormalizer provides several methods for normalizing strings.
  *
+ * Copyright © 03.07.13 by the authors listed below.
+ *
+ * @license GPL 2+
  * @since 0.4
  *
- * @package Wikibase
+ * @author Daniel Kinzler
+ * @author John Erling Blad < jeb...@gmail.com >
  */
 class StringNormalizer {
 
diff --git a/extensions/Wikibase/lib/includes/store/PropertyLabelResolver.php 
b/extensions/Wikibase/lib/includes/store/PropertyLabelResolver.php
index 7de6260..02c0403 100644
--- a/extensions/Wikibase/lib/includes/store/PropertyLabelResolver.php
+++ b/extensions/Wikibase/lib/includes/store/PropertyLabelResolver.php
@@ -1,5 +1,9 @@
 <?php
- /**
+
+namespace Wikibase;
+
+/**
+ * Resolves property labels (which are unique per language) into entity IDs.
  *
  * Copyright © 24.04.13 by the authors listed below.
  *
@@ -7,17 +11,6 @@
  *
  * @author daniel
  */
-
-
-namespace Wikibase;
-
-
-/**
- * Resolves property labels (which are unique per language) into entity IDs.
- *
- * @package Wikibase
- */
-
 interface PropertyLabelResolver {
 
        /**
diff --git a/extensions/Wikibase/lib/includes/store/StorageException.php 
b/extensions/Wikibase/lib/includes/store/StorageException.php
index bd22908..9519ba1 100644
--- a/extensions/Wikibase/lib/includes/store/StorageException.php
+++ b/extensions/Wikibase/lib/includes/store/StorageException.php
@@ -1,22 +1,14 @@
 <?php
- /**
- *
+
+namespace Wikibase;
+
+/**
  * Copyright © 06.06.13 by the authors listed below.
  *
  * @license GPL 2+
  *
  * @author Daniel Kinzler
  */
-
-
-namespace Wikibase;
-
-
-/**
- * Class StorageException
- * @package Wikibase
- */
-
 class StorageException extends \MWException {
 
 }
\ No newline at end of file
diff --git 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
index b2c7851..0822312 100644
--- 
a/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
+++ 
b/extensions/Wikibase/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
@@ -210,7 +210,7 @@
                                                { height: newHeight },
                                                {
                                                        queue: 
heightAnimationQueue,
-                                                       duration: 250,
+                                                       duration: 'fast', 
//defaults to 200
                                                        progress: function( 
animation, progress, remainingMs ) {
                                                                
$.ui.inputextender.redrawVisibleExtensions();
                                                        }
diff --git 
a/extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js 
b/extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
index 17d0502..22cbcb7 100644
--- a/extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
+++ b/extensions/Wikibase/lib/resources/jquery.wikibase/toolbar/edittoolbar.js
@@ -273,8 +273,8 @@
                                options = {};
                        }
 
-                       if ( !options.duration ) {
-                               options.duration = 200; // default fade duration
+                       if ( options.duration === undefined ) {
+                               options.duration = 'fast'; //defaults to 200
                        }
 
                        if ( !options.message ) { // show toolbar
diff --git a/extensions/Wikibase/lib/resources/wikibase.css 
b/extensions/Wikibase/lib/resources/wikibase.css
index dca9911..19e1771 100644
--- a/extensions/Wikibase/lib/resources/wikibase.css
+++ b/extensions/Wikibase/lib/resources/wikibase.css
@@ -99,11 +99,10 @@
 
 /* basically, a row in the grid layout */
 .wb-value-row {
-       width: 100%;
-       max-width: 65em;
-       position: relative; /* make absolute positioned toolbar align to the 
right edge */
-       font-size: 100%; /* font size needs to be set since it influences 
max-widh property */
        float: left; /* make row to take the dimensions of its containing 
blocks avoiding clipping */
+       font-size: 100%; /* font size needs to be set since it influences 
positioning */
+       position: relative; /* make absolute positioned toolbar align to the 
right edge */
+       width: 100%;
 }
 
 /* toolbar container */
@@ -231,6 +230,11 @@
        margin-bottom: 0; /* even out border of label container in view mode */
 }
 
+/* FIXME: Very specific selector to temporary overrule VectorBeta extension */
+#content .wb-firstHeading {
+       font-size: 100%;
+}
+
 /********** /LABEL **********/
 
 /********** DESCRIPTION **********/
diff --git a/extensions/Wikibase/repo/includes/ContentRetriever.php 
b/extensions/Wikibase/repo/includes/ContentRetriever.php
index 10f0eb0..5ca5495 100644
--- a/extensions/Wikibase/repo/includes/ContentRetriever.php
+++ b/extensions/Wikibase/repo/includes/ContentRetriever.php
@@ -5,7 +5,6 @@
 use Article;
 use Content;
 use Revision;
-use Title;
 use WebRequest;
 
 /**
@@ -18,6 +17,7 @@
  *
  * @licence GNU GPL v2+
  * @author Katie Filbert < aude.w...@gmail.com >
+ * @author Thiemo Mättig < thiemo.maet...@wikimedia.de >
  */
 class ContentRetriever {
 
@@ -30,20 +30,18 @@
         * @todo split out the get revision id stuff, add tests and see if
         * any core code can be shared here
         *
-        * @param Article $article
-        * @param Title $title
         * @param WebRequest $request
+        * @param Article $article
         *
         * @return Content|null
         */
-       public function getContentForRequest( Article $article, Title $title, 
WebRequest $request ) {
-               $queryValues = $request->getQueryValues();
-               $oldId = $article->getOldID();
+       public function getContentForRequest( WebRequest $request, Article 
$article ) {
+               $revision = $article->getRevisionFetched();
 
-               if ( array_key_exists( 'diff', $queryValues ) ) {
-                       $revision = $this->getDiffRevision( $oldId, 
$queryValues['diff'] );
-               } else {
-                       $revision = Revision::newFromTitle( $title, $oldId );
+               if ( $request->getCheck( 'diff' ) ) {
+                       $oldId = $revision->getId();
+                       $diffValue = $request->getVal( 'diff' );
+                       $revision = $this->resolveDiffRevision( $oldId, 
$diffValue, $article );
                }
 
                return $revision !== null ?
@@ -56,53 +54,39 @@
         * @since 0.5
         *
         * @param int $oldId
-        * @param string|int $diffValue
+        * @param int|string $diffValue
+        * @param Article $article
         *
         * @return Revision|null
         */
-       public function getDiffRevision( $oldId, $diffValue ) {
-               if ( $this->isSpecialDiffParam( $diffValue ) ) {
-                       return $this->resolveDiffRevision( $oldId, $diffValue );
+       protected function resolveDiffRevision( $oldId, $diffValue, Article 
$article )
+       {
+               $newid = $this->resolveNewid( $oldId, $diffValue, $article );
+
+               if ( !$newid ) {
+                       $newid = $article->getTitle()->getLatestRevID();
                }
 
-               if ( is_numeric( $diffValue ) ) {
-                       $revId = (int)$diffValue;
-                       return Revision::newFromId( $revId );
-               }
-
-               // uses default handling for revision not found
-               // @todo error handling could be improved!
-               return null;
+               return Revision::newFromId( $newid );
        }
 
        /**
-        * @param mixed $diffValue
+        * Get the revision ID specified in the diff parameter or prev/next 
revision of oldid
         *
-        * @return boolean
-        */
-       protected function isSpecialDiffParam( $diffValue ) {
-               return in_array( $diffValue, array( 'prev', 'next', 'cur', '0' 
), true );
-       }
-
-       /**
-        * For non-revision ids in the diff request param, get the correct 
revision
+        * @since 0.5
         *
         * @param int $oldId
-        * @param string|int $diffValue
+        * @param int|string $diffValue
+        * @param Article $article
         *
-        * @return Revision
+        * @return Bool|int
         */
-       protected function resolveDiffRevision( $oldId, $diffValue ) {
-               $oldIdRev = Revision::newFromId( $oldId );
-
-               if ( $diffValue === 0 || $diffValue === 'cur' ) {
-                       $curId = $oldIdRev->getTitle()->getLatestRevID();
-                       return Revision::newFromId( $curId );
-               } elseif ( $diffValue === 'next' ) {
-                       return $oldIdRev->getNext();
-               }
-
-               return $oldIdRev;
+       protected function resolveNewid( $oldId, $diffValue, Article $article )
+       {
+               $contentHandler = 
$article->getRevisionFetched()->getContentHandler();
+               $context = $article->getContext();
+               $differenceEngine = $contentHandler->createDifferenceEngine( 
$context, $oldId, $diffValue );
+               return $differenceEngine->getNewid();
        }
 
 }
diff --git a/extensions/Wikibase/repo/includes/actions/ViewEntityAction.php 
b/extensions/Wikibase/repo/includes/actions/ViewEntityAction.php
index da5d845..1e18d58 100644
--- a/extensions/Wikibase/repo/includes/actions/ViewEntityAction.php
+++ b/extensions/Wikibase/repo/includes/actions/ViewEntityAction.php
@@ -82,9 +82,8 @@
        public function show() {
                $contentRetriever = new ContentRetriever();
                $content = $contentRetriever->getContentForRequest(
-                       $this->getArticle(),
-                       $this->getTitle(),
-                       $this->getRequest()
+                       $this->getRequest(),
+                       $this->getArticle()
                );
 
                if ( is_null( $content ) ) {
@@ -130,9 +129,8 @@
 
                $contentRetriever = new ContentRetriever();
                $content = $contentRetriever->getContentForRequest(
-                       $this->getArticle(),
-                       $this->getTitle(),
-                       $this->getRequest()
+                       $this->getRequest(),
+                       $this->getArticle()
                );
 
                if ( !( $content instanceof EntityContent ) ) {
@@ -141,7 +139,7 @@
                        return false;
                }
 
-               if ( $this->getContext()->getRequest()->getCheck( 'diff' ) ) {
+               if ( $this->getRequest()->getCheck( 'diff' ) ) {
                        // showing a diff
                        return false;
                }
@@ -185,7 +183,7 @@
                }
 
                // Create and set the title.
-               if ( $this->getContext()->getRequest()->getCheck( 'diff' ) ) {
+               if ( $this->getRequest()->getCheck( 'diff' ) ) {
                        // Escaping HTML characters in order to retain original 
label that may contain HTML
                        // characters. This prevents having characters 
evaluated or stripped via
                        // OutputPage::setPageTitle:
@@ -236,7 +234,7 @@
                if ( $wgSend404Code ) {
                        // If there's no backing content, send a 404 Not Found
                        // for better machine handling of broken links.
-                       $this->getContext()->getRequest()->response()->header( 
"HTTP/1.1 404 Not Found" );
+                       $this->getRequest()->response()->header( "HTTP/1.1 404 
Not Found" );
                }
 
                $hookResult = wfRunHooks( 'BeforeDisplayNoArticleText', array( 
$this ) );
diff --git a/extensions/Wikibase/repo/resources/themes/default/wikibase.toc.css 
b/extensions/Wikibase/repo/resources/themes/default/wikibase.toc.css
index 9afd333..b3e1bf5 100644
--- a/extensions/Wikibase/repo/resources/themes/default/wikibase.toc.css
+++ b/extensions/Wikibase/repo/resources/themes/default/wikibase.toc.css
@@ -3,6 +3,7 @@
  *
  * @licence GNU GPL v2+
  * @author H. Snater < mediaw...@snater.com >
+ * @author T. Mättig < thiemo.maet...@wikimedia.de >
  */
 
 .wb-entity #toc {
@@ -20,19 +21,23 @@
 
 .wb-entity #toc ul {
        float: left;
-       margin: 0;
-       padding: 0.4em 10px;
+       margin: 0 0 0 -.5em;
+       padding: .4em 10px;
 }
 
 .wb-entity #toc li {
-       border-left: 1px solid #c9c9c9;
+       border-right: 1px solid #c9c9c9;
        float: left;
-       margin-bottom: 0;
-       padding: 0 0.5em;
+       margin: 0;
+       padding: 0 .5em;
        white-space: nowrap;
 }
 
-.wb-entity #toc li:first-child {
-       border-left: none;
-       padding-left: 0;
+.wb-entity #toc li:last-child {
+       border-right: 0;
+}
+
+/* FIXME: Very specific selector to temporary overrule VectorBeta extension */
+#content .wb-entity #toc {
+       margin-top: 1.8em;
 }
diff --git 
a/extensions/Wikibase/repo/resources/wikibase.ui.scrapeFormattedValues.js 
b/extensions/Wikibase/repo/resources/wikibase.ui.scrapeFormattedValues.js
index a4ac683..469d573 100644
--- a/extensions/Wikibase/repo/resources/wikibase.ui.scrapeFormattedValues.js
+++ b/extensions/Wikibase/repo/resources/wikibase.ui.scrapeFormattedValues.js
@@ -32,9 +32,7 @@
                        var $claim = null,
                                mainSnak = claim.getMainSnak(),
                                $qualifierValues = null,
-                               iQualifiers = 0,
-                               $referenceValues = null,
-                               iReferences = 0;
+                               iQualifiers = 0;
 
                        if( mainSnak.getType() === 'value' && isSnakToScrape( 
mainSnak ) ) {
                                $claim = getClaimNode( claim.getGuid() );
@@ -57,6 +55,9 @@
                        } );
 
                        $.each( claim.getReferences(), function( j, reference ) 
{
+                               var $referenceValues = null,
+                                       iReferences = 0;
+
                                $.each( 
reference.getSnaks().getGroupedSnakLists(), function( j, snakList ) {
                                        snakList.each( function( k, snak ) {
                                                if( snak.getType() === 'value' 
&& isSnakToScrape( snak ) ) {
diff --git 
a/extensions/Wikibase/repo/tests/phpunit/includes/ContentRetrieverTest.php 
b/extensions/Wikibase/repo/tests/phpunit/includes/ContentRetrieverTest.php
index 6d904b3..e49bd63 100644
--- a/extensions/Wikibase/repo/tests/phpunit/includes/ContentRetrieverTest.php
+++ b/extensions/Wikibase/repo/tests/phpunit/includes/ContentRetrieverTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Test;
 
 use Revision;
+use Title;
 use Wikibase\ContentRetriever;
 use Wikibase\Item;
 use Wikibase\ItemContent;
@@ -28,30 +29,125 @@
  */
 class ContentRetrieverTest extends \MediaWikiTestCase {
 
+       /**
+        * @param int $oldId
+        * @param Revision $revision
+        * @param Title $title
+        *
+        * @return \PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getArticleMock( $oldId, Revision $revision, Title 
$title )
+       {
+               $context = $this->getContextMock( $title );
+               $page = $this->getPageMock( $revision );
+
+               $article = $this->getMockBuilder( 'Article' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $article->expects( $this->any() )
+                       ->method( 'getContext' )
+                       ->will( $this->returnValue( $context ) );
+
+               $article->expects( $this->any() )
+                       ->method( 'getOldID' )
+                       ->will( $this->returnValue( $oldId ) );
+
+               $article->expects( $this->any() )
+                       ->method( 'getPage' )
+                       ->will( $this->returnValue( $page ) );
+
+               $article->expects( $this->any() )
+                       ->method( 'getRevisionFetched' )
+                       ->will( $this->returnValue( $revision ) );
+
+               $article->expects( $this->any() )
+                       ->method( 'getTitle' )
+                       ->will( $this->returnValue( $title ) );
+
+               return $article;
+       }
+
+       /**
+        * @param Title $title
+        *
+        * @return \PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getContextMock( Title $title )
+       {
+               $context = $this->getMockBuilder( 'IContextSource' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $context->expects( $this->any() )
+                       ->method( 'getLanguage' )
+                       ->will( $this->returnValue( $title->getPageLanguage() ) 
);
+
+               $context->expects( $this->any() )
+                       ->method( 'getTitle' )
+                       ->will( $this->returnValue( $title ) );
+
+               return $context;
+       }
+
+       /**
+        * @param Revision $revision
+        *
+        * @return \PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getPageMock( Revision $revision )
+       {
+               $page = $this->getMockBuilder( 'WikiPage' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $page->expects( $this->any() )
+                       ->method( 'getContentHandler' )
+                       ->will( $this->returnValue( 
$revision->getContentHandler() ) );
+
+               return $page;
+       }
+
+       /**
+        * @param array $queryParams
+        *
+        * @return \PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getRequestMock( array $queryParams )
+       {
+               $request = $this->getMockBuilder( 'WebRequest' )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               $request->expects( $this->any() )
+                       ->method( 'getCheck' )
+                       ->will( $this->returnValue( isset( $queryParams['diff'] 
) ) );
+
+               $request->expects( $this->any() )
+                       ->method( 'getQueryValues' )
+                       ->will( $this->returnValue( $queryParams ) );
+
+               $request->expects( $this->any() )
+                       ->method( 'getVal' )
+                       ->will( $this->returnValue( isset( $queryParams['diff'] 
) ? $queryParams['diff'] : null ) );
+
+               return $request;
+       }
+
        public function testGetContentForRequest() {
                $cases = $this->getContentCases();
 
                foreach( $cases as $case ) {
+                       /** @var Title $title */
                        list( $expected, $oldId, $queryParams, $title, $message 
) = $case;
 
-                       $article = $this->getMockBuilder( 'Article' )
-                               ->disableOriginalConstructor()
-                               ->getMock();
+                       $revision = Revision::newFromId( $oldId );
 
-                       $article->expects( $this->any() )
-                               ->method( 'getOldID' )
-                               ->will( $this->returnValue( $oldId ) );
-
-                       $request = $this->getMockBuilder( 'WebRequest' )
-                               ->disableOriginalConstructor()
-                               ->getMock();
-
-                       $request->expects( $this->any() )
-                               ->method( 'getQueryValues' )
-                               ->will( $this->returnValue( $queryParams ) );
+                       $request = $this->getRequestMock( $queryParams );
+                       $article = $this->getArticleMock( $oldId, $revision, 
$title );
 
                        $contentRetriever = new ContentRetriever();
-                       $content = $contentRetriever->getContentForRequest( 
$article, $title, $request );
+                       $content = $contentRetriever->getContentForRequest( 
$request, $article );
 
                        $this->assertEquals( $expected, $content, $message );
                }
@@ -77,10 +173,18 @@
                        $content->getEntity()->setDescription( 'en', 
$description );
                        $page->doEditContent( $content, 'edit description' );
                        $revIds[] = $page->getLatest();
+
+                       /** @var ItemContent $content */
+                       $content = Revision::newFromId( $revIds[count( $revIds 
) - 1] )->getContent();
                }
 
+               /**
+                * @var ItemContent $content2
+                * @var ItemContent $content3
+                */
                $content2 = Revision::newFromId( $revIds[1] )->getContent();
                $content3 = Revision::newFromId( $revIds[2] )->getContent();
+               $this->assertNotEquals( $content2, $content3, 'Setup failed' );
 
                return array(
                        array( $content3, $revIds[0], array( 'diff' => '0', 
'oldid' => $revIds[0] ), $title, 'diff=0' ),
@@ -88,8 +192,11 @@
                        array( $content2, $revIds[0], array( 'diff' => 'next', 
'oldid' => $revIds[0] ), $title, 'diff=next' ),
                        array( $content2, $revIds[1], array( 'diff' => 'prev', 
'oldid' => $revIds[1] ), $title, 'diff=prev' ),
                        array( $content3, $revIds[1], array( 'diff' => 'cur', 
'oldid' => $revIds[1] ), $title, 'diff=cur' ),
+                       array( $content3, $revIds[1], array( 'diff' => 'c', 
'oldid' => $revIds[1] ), $title, 'diff=c' ),
+                       array( $content3, $revIds[1], array( 'diff' => '0', 
'oldid' => $revIds[1] ), $title, 'diff=0' ),
+                       array( $content3, $revIds[1], array( 'diff' => '', 
'oldid' => $revIds[1] ), $title, 'diff=' ),
                        array( $content3, $revIds[2], array(), $title, 'no 
query params' ),
-                       array( null, $revIds[1], array( 'diff' => 'kitten', 
'oldid' => $revIds[0] ), $title, 'diff=kitten' )
+                       array( null, $revIds[1], array( 'diff' => '-1', 'oldid' 
=> $revIds[0] ), $title, 'diff=-1' )
                );
        }
 
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 0d6214f..1b05807 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -4,4 +4,4 @@
 
 require_once __DIR__ . '/composer' . '/autoload_real.php';
 
-return ComposerAutoloaderInitecf43a55a9880e9e2209f86a59e7fbf5::getLoader();
+return ComposerAutoloaderInit0bc1df66e5d5b850d8bc3f99977216f4::getLoader();
diff --git a/vendor/composer/autoload_real.php 
b/vendor/composer/autoload_real.php
index a21a150..6610ee0 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
 
 // autoload_real.php @generated by Composer
 
-class ComposerAutoloaderInitecf43a55a9880e9e2209f86a59e7fbf5
+class ComposerAutoloaderInit0bc1df66e5d5b850d8bc3f99977216f4
 {
     private static $loader;
 
@@ -19,9 +19,9 @@
             return self::$loader;
         }
 
-        
spl_autoload_register(array('ComposerAutoloaderInitecf43a55a9880e9e2209f86a59e7fbf5',
 'loadClassLoader'), true, true);
+        
spl_autoload_register(array('ComposerAutoloaderInit0bc1df66e5d5b850d8bc3f99977216f4',
 'loadClassLoader'), true, true);
         self::$loader = $loader = new \Composer\Autoload\ClassLoader();
-        
spl_autoload_unregister(array('ComposerAutoloaderInitecf43a55a9880e9e2209f86a59e7fbf5',
 'loadClassLoader'));
+        
spl_autoload_unregister(array('ComposerAutoloaderInit0bc1df66e5d5b850d8bc3f99977216f4',
 'loadClassLoader'));
 
         $vendorDir = dirname(__DIR__);
         $baseDir = dirname($vendorDir);
@@ -45,14 +45,14 @@
 
         $includeFiles = require __DIR__ . '/autoload_files.php';
         foreach ($includeFiles as $file) {
-            composerRequireecf43a55a9880e9e2209f86a59e7fbf5($file);
+            composerRequire0bc1df66e5d5b850d8bc3f99977216f4($file);
         }
 
         return $loader;
     }
 }
 
-function composerRequireecf43a55a9880e9e2209f86a59e7fbf5($file)
+function composerRequire0bc1df66e5d5b850d8bc3f99977216f4($file)
 {
     require $file;
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index edee264..f8b47e0 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -664,7 +664,7 @@
                 "name": "Jeroen De Dauw",
                 "email": "jeroended...@gmail.com",
                 "homepage": "http://jeroendedauw.com";,
-                "role": "Developer"
+                "role": "Core developer"
             },
             {
                 "name": "Daniel Werner",
@@ -878,12 +878,12 @@
         "source": {
             "type": "git",
             "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git";,
-            "reference": "adabc6623d832f19c57f9083e53299f0137ac4de"
+            "reference": "e78a231b6dbbda6b318032c59bbbbec7593cb321"
         },
         "dist": {
             "type": "zip",
-            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/adabc6623d832f19c57f9083e53299f0137ac4de";,
-            "reference": "adabc6623d832f19c57f9083e53299f0137ac4de",
+            "url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/e78a231b6dbbda6b318032c59bbbbec7593cb321";,
+            "reference": "e78a231b6dbbda6b318032c59bbbbec7593cb321",
             "shasum": ""
         },
         "require": {
@@ -902,7 +902,7 @@
             "wikibase/data-model": "~0.6.0",
             "wikibase/easyrdf_lite": "*"
         },
-        "time": "2014-02-26 22:06:03",
+        "time": "2014-02-28 09:25:49",
         "type": "mediawiki-extension",
         "installation-source": "dist",
         "autoload": {

-- 
To view, visit https://gerrit.wikimedia.org/r/116070
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b7dd2a51730f6cde45d11b638fc6da8273655d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikidata
Gerrit-Branch: master
Gerrit-Owner: wikidata-servi...@wikimedia.de
Gerrit-Reviewer: WikidataJenkins <wikidata-servi...@wikimedia.de>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to