From: jeroendedauw Date: Wed, 6 Jun 2012 14:42:18 +0000 (+0200) Subject: merged master X-Git-Tag: 1.31.0-rc.0~22097^2^2~145^2 X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=commitdiff_plain;h=a7e28d201191e7ca8a51d10140f3f84c266b197d;p=lhc%2Fweb%2Fwiklou.git merged master Change-Id: I4cf7b0f87cd571a6b50f66995dd9ad987a6ecdf8 --- a7e28d201191e7ca8a51d10140f3f84c266b197d diff --cc includes/LinksUpdate.php index 4b484a7934,0712ac807b..57a9ed9fe7 --- a/includes/LinksUpdate.php +++ b/includes/LinksUpdate.php @@@ -63,10 -65,12 +63,14 @@@ class LinksUpdate extends SqlDataUpdat $this->mTitle = $title; $this->mId = $title->getArticleID(); + assert( $this->mId > 0 ); + if ( !$this->mId ) { + throw new MWException( "The Title object did not provide an article ID. Perhaps the page doesn't exist?" ); + } + $this->mParserOutput = $parserOutput; + $this->mLinks = $parserOutput->getLinks(); $this->mImages = $parserOutput->getImages(); $this->mTemplates = $parserOutput->getTemplates(); diff --cc includes/WikiPage.php index a7a3170804,b5f4c1dfa6..c2278df960 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@@ -3197,13 -2971,6 +3193,14 @@@ class WikiPage extends Page global $wgUser; return $this->isParserCacheUsed( ParserOptions::newFromUser( $wgUser ), $oldid ); } + + public function getDeletionUpdates() { + $updates = $this->getContentHandler()->getDeletionUpdates( $this ); + + wfRunHooks( 'WikiPageDeletionUpdates', array( $this, &$updates ) ); + return $updates; + } ++ } class PoolWorkArticleView extends PoolCounterWork { diff --cc tests/phpunit/maintenance/DumpTestCase.php index eaa6aa0e94,976fd6bed5..71cd988ac5 --- a/tests/phpunit/maintenance/DumpTestCase.php +++ b/tests/phpunit/maintenance/DumpTestCase.php @@@ -313,19 -311,9 +311,21 @@@ abstract class DumpTestCase extends Med $this->skipWhitespace(); $this->assertTextNode( "comment", $summary ); + $this->skipWhitespace(); + + if ( $this->xml->name == "model" ) { // model tag is optional + $this->assertTextNode( "model", CONTENT_MODEL_WIKITEXT ); //@todo: make this a test parameter + $this->skipWhitespace(); + } + + + if ( $this->xml->name == "format" ) { // format tag is optional + $this->assertTextNode( "format", CONTENT_FORMAT_WIKITEXT ); //@todo: make this a test parameter + $this->skipWhitespace(); + } + $this->assertTextNode( "sha1", $text_sha1 ); + $this->assertNodeStart( "text", false ); if ( $text_bytes !== false ) { $this->assertEquals( $this->xml->getAttribute( "bytes" ), $text_bytes,