Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F5047
deleteloglimit.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 10:17 PM
2014-11-21 22:17:39 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
deleteloglimit.patch
View Options
Index: includes/Article.php
===================================================================
--- includes/Article.php (revision 41044)
+++ includes/Article.php (working copy)
@@ -813,7 +813,9 @@
if ($this->getID() == 0) {
$loglist = new LogEventsList( $wgUser->getSkin(), $wgOut );
$pager = new LogPager( $loglist, 'delete', false, $this->mTitle->getPrefixedText() );
- if( $pager->getNumRows() > 0 ) {
+ $count = $pager->getNumRows();
+ if( $count > 0 ) {
+ $pager->mLimit = 10;
$wgOut->addHtml( '<div id="mw-deleted-notice">' );
$wgOut->addWikiMsg( 'deleted-notice' );
$wgOut->addHTML(
@@ -821,6 +823,15 @@
$pager->getBody() .
$loglist->endLogEventsList()
);
+ if($count > 10){
+ $wgOut->addHtml( $wgUser->getSkin()->link(
+ SpecialPage::getTitleFor( 'Log' ),
+ wfMsgHtml( 'deletelog-fulllog' ),
+ array(),
+ array(
+ 'type' => 'delete',
+ 'page' => $this->mTitle->getPrefixedText() ) ) );
+ }
$wgOut->addHtml( '</div>' );
}
}
Index: includes/EditPage.php
===================================================================
--- includes/EditPage.php (revision 41044)
+++ includes/EditPage.php (working copy)
@@ -2341,7 +2341,9 @@
global $wgUser;
$loglist = new LogEventsList( $wgUser->getSkin(), $out );
$pager = new LogPager( $loglist, 'delete', false, $this->mTitle->getPrefixedText() );
- if ( $pager->getNumRows() > 0 ) {
+ $count = $pager->getNumRows();
+ if ( $count > 0 ) {
+ $pager->mLimit = 10;
$out->addHtml( '<div id="mw-recreate-deleted-warn">' );
$out->addWikiMsg( 'recreate-deleted-warn' );
$out->addHTML(
@@ -2349,9 +2351,19 @@
$pager->getBody() .
$loglist->endLogEventsList()
);
+ if($count > 10){
+ $out->addHtml( $wgUser->getSkin()->link(
+ SpecialPage::getTitleFor( 'Log' ),
+ wfMsgHtml( 'deletelog-fulllog' ),
+ array(),
+ array(
+ 'type' => 'delete',
+ 'page' => $this->mTitle->getPrefixedText() ) ) );
+ }
$out->addHtml( '</div>' );
return true;
}
+
return false;
}
Index: languages/messages/MessagesEn.php
===================================================================
--- languages/messages/MessagesEn.php (revision 41044)
+++ languages/messages/MessagesEn.php (working copy)
@@ -1187,6 +1187,7 @@
The deletion log for this page is provided here for convenience:",
'deleted-notice' => 'This page has been deleted.
The deletion log for the page is provided below for reference.',
+'deletelog-fulllog' => 'View full log',
# Parser/template warnings
'expensive-parserfunction-warning' => 'Warning: This page contains too many expensive parser function calls.
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4610
Default Alt Text
deleteloglimit.patch (2 KB)
Attached To
Mode
T17650: Limit length of displayed deletion log while creating a new page
Attached
Detach File
Event Timeline
Log In to Comment