r41131 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r41130‎ | r41131 | r41132 >
Date:20:25, 21 September 2008
Author:mattj
Status:old
Tags:
Comment:
(Bug 15650) Limit length of displayed deletion log while creating a new page
Very similair to Bug 14638 and r40944, for block form
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -813,7 +813,9 @@
814814 if ($this->getID() == 0) {
815815 $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut );
816816 $pager = new LogPager( $loglist, 'delete', false, $this->mTitle->getPrefixedText() );
817 - if( $pager->getNumRows() > 0 ) {
 817+ $count = $pager->getNumRows();
 818+ if( $count > 0 ) {
 819+ $pager->mLimit = 10;
818820 $wgOut->addHtml( '<div id="mw-deleted-notice">' );
819821 $wgOut->addWikiMsg( 'deleted-notice' );
820822 $wgOut->addHTML(
@@ -821,6 +823,15 @@
822824 $pager->getBody() .
823825 $loglist->endLogEventsList()
824826 );
 827+ if($count > 10){
 828+ $wgOut->addHtml( $wgUser->getSkin()->link(
 829+ SpecialPage::getTitleFor( 'Log' ),
 830+ wfMsgHtml( 'deletelog-fulllog' ),
 831+ array(),
 832+ array(
 833+ 'type' => 'delete',
 834+ 'page' => $this->mTitle->getPrefixedText() ) ) );
 835+ }
825836 $wgOut->addHtml( '</div>' );
826837 }
827838 }
Index: trunk/phase3/includes/EditPage.php
@@ -2340,7 +2340,9 @@
23412341 global $wgUser;
23422342 $loglist = new LogEventsList( $wgUser->getSkin(), $out );
23432343 $pager = new LogPager( $loglist, 'delete', false, $this->mTitle->getPrefixedText() );
2344 - if ( $pager->getNumRows() > 0 ) {
 2344+ $count = $pager->getNumRows();
 2345+ if ( $count > 0 ) {
 2346+ $pager->mLimit = 10;
23452347 $out->addHtml( '<div id="mw-recreate-deleted-warn">' );
23462348 $out->addWikiMsg( 'recreate-deleted-warn' );
23472349 $out->addHTML(
@@ -2348,9 +2350,19 @@
23492351 $pager->getBody() .
23502352 $loglist->endLogEventsList()
23512353 );
 2354+ if($count > 10){
 2355+ $out->addHtml( $wgUser->getSkin()->link(
 2356+ SpecialPage::getTitleFor( 'Log' ),
 2357+ wfMsgHtml( 'deletelog-fulllog' ),
 2358+ array(),
 2359+ array(
 2360+ 'type' => 'delete',
 2361+ 'page' => $this->mTitle->getPrefixedText() ) ) );
 2362+ }
23522363 $out->addHtml( '</div>' );
23532364 return true;
23542365 }
 2366+
23552367 return false;
23562368 }
23572369
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -1186,6 +1186,7 @@
11871187 The deletion log for this page is provided here for convenience:",
11881188 'deleted-notice' => 'This page has been deleted.
11891189 The deletion log for the page is provided below for reference.',
 1190+'deletelog-fulllog' => 'View full log',
11901191
11911192 # Parser/template warnings
11921193 'expensive-parserfunction-warning' => 'Warning: This page contains too many expensive parser function calls.

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r40838(bug 14638)...soxred9301:26, 15 September 2008
r40944Readding 'Full Block Log' link, after being removed for not using Linker func...soxred9302:50, 17 September 2008