From: Aryeh Gregor Date: Tue, 16 Jun 2009 10:26:59 +0000 (+0000) Subject: Show right logs when viewing/creating deleted page X-Git-Tag: 1.31.0-rc.0~41348 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=67fc59018f369311ac382fc00844c85459d25a09;p=lhc%2Fweb%2Fwiklou.git 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. --- 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;