(bug 6179) Actually the log for people who can't edit
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 17 Oct 2008 23:25:46 +0000 (23:25 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 17 Oct 2008 23:25:46 +0000 (23:25 +0000)
includes/OutputPage.php

index e07c74b..2ee510c 100644 (file)
@@ -1259,7 +1259,14 @@ class OutputPage {
                        } else {
                                $this->setPageTitle( wfMsg( 'badaccess' ) );
                        }
+                       if( $protected ) {
+                               $this->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" );
+                       }
                        $this->addWikiText( $this->formatPermissionsErrorMessage( $reasons, $action ) );
+                       if( $protected ) {
+                               LogEventsList::showLogExtract( $this, 'protect', $wgTitle->getPrefixedText(), '', 1 );
+                               $this->addHTML( "</div>\n" );
+                       }
                } else {
                        // Wiki is read only
                        $this->setPageTitle( wfMsg( 'readonly' ) );