(bug 32827) "[Regression] Block log for IP ranges not shown on Special:Block"
[lhc/web/wiklou.git] / includes / ImagePage.php
index cc2d5df..b41e126 100644 (file)
@@ -109,8 +109,6 @@ class ImagePage extends Article {
                        }
                }
 
-               $this->showRedirectedFromHeader();
-
                if ( $wgShowEXIF && $this->displayImg->exists() ) {
                        // @todo FIXME: Bad interface, see note on MediaHandler::formatMetadata().
                        $formattedMetadata = $this->displayImg->formatMetadata();
@@ -470,6 +468,22 @@ EOT
                        }
                } else {
                        # Image does not exist
+                       if ( !$this->getID() ) {
+                               # No article exists either
+                               # Show deletion log to be consistent with normal articles
+                               LogEventsList::showLogExtract(
+                                       $wgOut,
+                                       array( 'delete', 'move' ),
+                                       $this->getTitle()->getPrefixedText(),
+                                       '',
+                                       array(  'lim' => 10,
+                                               'conds' => array( "log_action != 'revision'" ),
+                                               'showIfEmpty' => false,
+                                               'msgKey' => array( 'moveddeleted-notice' )
+                                       )
+                               );
+                       }
+
                        if ( $wgEnableUploads && $wgUser->isAllowed( 'upload' ) ) {
                                // Only show an upload link if the user can upload
                                $uploadTitle = SpecialPage::getTitleFor( 'Upload' );