From 44331b16a8fbe2282d90bcf2b0b5733cca01f39d Mon Sep 17 00:00:00 2001 From: Rob Church Date: Mon, 27 Aug 2007 15:55:02 +0000 Subject: [PATCH] Show relevant deletion log lines --- includes/FileDeleteForm.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index e2be53f63f..ee165cd19d 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -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( '

' . htmlspecialchars( LogPage::logName( 'delete' ) ) . "

\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 -- 2.20.1