$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();
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 {
$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,