r40509 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r40508‎ | r40509 | r40510 >
Date:22:46, 5 September 2008
Author:aaron
Status:old
Tags:
Comment:
Add more protection info on edit (bug 6179)
Modified paths:
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/LogEventsList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -1203,6 +1203,7 @@
12041204 }
12051205 $wgOut->addHTML( "<div id='mw-edit-$noticeMsg'>\n" );
12061206 $wgOut->addWikiMsg( $noticeMsg );
 1207+ LogEventsList::showLogExtract( $wgOut, 'protect', $this->mTitle->getPrefixedText(), '', 1 );
12071208 $wgOut->addHTML( "</div>\n" );
12081209 }
12091210 if( $this->mTitle->isCascadeProtected() ) {
Index: trunk/phase3/includes/LogEventsList.php
@@ -367,11 +367,12 @@
368368 * @param string $page
369369 * @param string $user
370370 */
371 - public static function showLogExtract( $out, $type='', $page='', $user='' ) {
 371+ public static function showLogExtract( $out, $type='', $page='', $user='', $limit = NULL ) {
372372 global $wgUser;
373373 # Insert list of top 50 or so items
374374 $loglist = new LogEventsList( $wgUser->getSkin(), $out, 0 );
375375 $pager = new LogPager( $loglist, $type, $user, $page, '' );
 376+ if( $limit ) $pager->mLimit = $limit;
376377 $logBody = $pager->getBody();
377378 if( $logBody ) {
378379 $out->addHTML(
@@ -382,7 +383,7 @@
383384 } else {
384385 $out->addWikiMsg( 'logempty' );
385386 }
386 - }
 387+ }
387388
388389 /**
389390 * SQL clause to skip forbidden log types for this user

Follow-up revisions

RevisionCommit summaryAuthorDate
r42181(bug 6179) Actually the log for people who can't editaaron23:25, 17 October 2008
r42235Back out r42181 "(bug 6179) Actually the log for people who can't edit"...brion23:53, 19 October 2008