From 31730c106d4b0c30db3dd210fb5cc29fbc79003d Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Mon, 4 Jun 2007 08:39:13 +0000 Subject: [PATCH] Adding CSS-IDs to deletion log section --- includes/Article.php | 9 +++++---- includes/EditPage.php | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index ccc7bc176e..fa7d23922a 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -857,7 +857,7 @@ class Article { * 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 @@ -2006,22 +2006,23 @@ class Article { $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( "

" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "

\n" ); + $out->addHTML( "

" . htmlspecialchars( LogPage::logName( 'delete' ) ) . "

\n" ); $logViewer = new LogViewer( new LogReader( new FauxRequest( array( 'page' => $this->mTitle->getPrefixedText(), 'type' => 'delete' ) ) ) ); $logViewer->showList( $out ); + $out->addHTML( "
" ); } diff --git a/includes/EditPage.php b/includes/EditPage.php index a30c79f9ac..155530c74c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -604,8 +604,8 @@ class EditPage { $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' ); } } -- 2.20.1