r112864 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112863‎ | r112864 | r112865 >
Date:01:02, 2 March 2012
Author:bawolff
Status:ok
Tags:
Comment:
(bug 34863) Make it so an image that was previously deleted and currently does not exist (locally or foreignly), shows a snippet from the deletion (and move) log.

Currently things outside of file namespace display the snippet, so file ns should display snippet for completeness. As far as I can tell, the only reason files don't is because ImagePage class overrides the Article class, and it was unintentional that the snippet was not included in ImagePage class.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.20 (modified) (history)
  • /trunk/phase3/includes/ImagePage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImagePage.php
@@ -468,6 +468,22 @@
469469 }
470470 } else {
471471 # Image does not exist
 472+ if ( !$this->getID() ) {
 473+ # No article exists either
 474+ # Show deletion log to be consistent with normal articles
 475+ LogEventsList::showLogExtract(
 476+ $wgOut,
 477+ array( 'delete', 'move' ),
 478+ $this->getTitle()->getPrefixedText(),
 479+ '',
 480+ array( 'lim' => 10,
 481+ 'conds' => array( "log_action != 'revision'" ),
 482+ 'showIfEmpty' => false,
 483+ 'msgKey' => array( 'moveddeleted-notice' )
 484+ )
 485+ );
 486+ }
 487+
472488 if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
473489 // Only show an upload link if the user can upload
474490 $uploadTitle = SpecialPage::getTitleFor( 'Upload' );
Index: trunk/phase3/RELEASE-NOTES-1.20
@@ -37,6 +37,7 @@
3838 * (bug 34702) Localised parentheses are now used in more special pages.
3939 * (bug 34723) When editing a script page on a RTL wiki the textbox should be LTR.
4040 * (bug 34762) Calling close() on a DatabaseBase object now clears the connection.
 41+* (bug 34863) Show deletion log extract on non-existent file pages if applicable.
4142
4243 === API changes in 1.20 ===
4344 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.

Status & tagging log