From 67fc59018f369311ac382fc00844c85459d25a09 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 16 Jun 2009 10:26:59 +0000 Subject: [PATCH] Show right logs when viewing/creating deleted page Patch by Church of Emacs (bug 16950) with whitespace fixes. r51041 tried to remove just rev_deleted log entries from displaying (bug 18747), but removed all entries other than page deletion instead (including restoration and move logs). It also only removed rev_deleted log entries for recreating, not just viewing. --- includes/Article.php | 3 ++- includes/EditPage.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 21b402f8da..ef8ae82872 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -1078,7 +1078,8 @@ class Article { protected function showLogs() { global $wgUser, $wgOut; $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut ); - $pager = new LogPager( $loglist, array('move', 'delete'), false, $this->mTitle->getPrefixedText() ); + $pager = new LogPager( $loglist, array('move', 'delete'), false, + $this->mTitle->getPrefixedText(), '', array( "log_action != 'revision'" ) ); if( $pager->getNumRows() > 0 ) { $pager->mLimit = 10; $wgOut->addHTML( '
' ); diff --git a/includes/EditPage.php b/includes/EditPage.php index 9fc27c8941..7477698161 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -2465,7 +2465,8 @@ END global $wgUser; $loglist = new LogEventsList( $wgUser->getSkin(), $out ); $pager = new LogPager( $loglist, array('move', 'delete'), false, - $this->mTitle->getPrefixedText(), '', array('log_action'=>'delete') ); + $this->mTitle->getPrefixedText(), '', array( "log_action != 'revision'" ) ); + $count = $pager->getNumRows(); if ( $count > 0 ) { $pager->mLimit = 10; -- 2.20.1