From: Aaron Schulz Date: Fri, 5 Sep 2008 22:46:46 +0000 (+0000) Subject: Add more protection info on edit (bug 6179) X-Git-Tag: 1.31.0-rc.0~45455 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/password.php?a=commitdiff_plain;h=7c7951f78fac944934a18bf34b1e12cd8ec3c850;p=lhc%2Fweb%2Fwiklou.git Add more protection info on edit (bug 6179) --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 5936f6682b..e733ef12f0 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1203,6 +1203,7 @@ class EditPage { } $wgOut->addHTML( "
\n" ); $wgOut->addWikiMsg( $noticeMsg ); + LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', 1 ); $wgOut->addHTML( "
\n" ); } if( $this->mTitle->isCascadeProtected() ) { diff --git a/includes/LogEventsList.php b/includes/LogEventsList.php index f868b00128..28b0ea4f1a 100644 --- a/includes/LogEventsList.php +++ b/includes/LogEventsList.php @@ -367,11 +367,12 @@ class LogEventsList { * @param string $page * @param string $user */ - public static function showLogExtract( $out, $type='', $page='', $user='' ) { + public static function showLogExtract( $out, $type='', $page='', $user='', $limit = NULL ) { global $wgUser; # Insert list of top 50 or so items $loglist = new LogEventsList( $wgUser->getSkin(), $out, 0 ); $pager = new LogPager( $loglist, $type, $user, $page, '' ); + if( $limit ) $pager->mLimit = $limit; $logBody = $pager->getBody(); if( $logBody ) { $out->addHTML( @@ -382,7 +383,7 @@ class LogEventsList { } else { $out->addWikiMsg( 'logempty' ); } - } + } /** * SQL clause to skip forbidden log types for this user