* This won't appear when editing a new page, but will when viewing a nonexistant one.
*/
if ( 0 == $this->getID() ) {
- $this->showLogExtract( $wgOut );
+ $this->showLogExtract( $wgOut, 'view' );
}
# Trackbacks
$wgOut->returnToMain( false );
- $this->showLogExtract( $wgOut );
+ $this->showLogExtract( $wgOut, 'delete' );
}
/**
* Fetch deletion log
*/
- function showLogExtract( &$out ) {
+ function showLogExtract( &$out, $type = '' ) {
# Show relevant lines from the deletion log:
- $out->addHTML( "<h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
+ $out->addHTML( "<div id='mw-article-$type-deletionlog'><h2>" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
$logViewer = new LogViewer(
new LogReader(
new FauxRequest(
array( 'page' => $this->mTitle->getPrefixedText(),
'type' => 'delete' ) ) ) );
$logViewer->showList( $out );
+ $out->addHTML( "</div>" );
}
$wgOut->addWikiText( wfMsg( 'newarticletext' ) );
else
$wgOut->addWikiText( wfMsg( 'newarticletextanon' ) );
- // Show deletion log when editing new article.
- $this->mArticle->showLogExtract( $wgOut );
+ // Show deletion log when editing new article.
+ $this->mArticle->showLogExtract( $wgOut, 'create' );
}
}