Show relevant deletion log lines
authorRob Church <robchurch@users.mediawiki.org>
Mon, 27 Aug 2007 15:55:02 +0000 (15:55 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Mon, 27 Aug 2007 15:55:02 +0000 (15:55 +0000)
includes/FileDeleteForm.php

index e2be53f..ee165cd 100644 (file)
@@ -90,8 +90,8 @@ class FileDeleteForm {
                        return;
                }
                
-               // Show the form
-               $this->showForm();              
+               $this->showForm();
+               $this->showLogEntries();
        }
        
        /**
@@ -114,6 +114,25 @@ class FileDeleteForm {
                $wgOut->addHtml( $form );
        }
        
+       /**
+        * Show deletion log fragments pertaining to the current file
+        */
+       private function showLogEntries() {
+               global $wgOut;
+               $wgOut->addHtml( '<h2>' . htmlspecialchars( LogPage::logName( 'delete' ) ) . "</h2>\n" );
+               $reader = new LogViewer(
+                       new LogReader(
+                               new FauxRequest(
+                                       array(
+                                               'type' => 'delete',
+                                               'page' => $this->title->getPrefixedText(),
+                                       )
+                               )
+                       )
+               );
+               $reader->showList( $wgOut );            
+       }
+       
        /**
         * Prepare a message referring to the file being deleted,
         * showing an appropriate message depending upon whether