Index: Article.php =================================================================== --- Article.php (revision 21155) +++ Article.php (working copy) @@ -1690,7 +1690,10 @@ } # Prepare a null revision to be added to the history - $comment = $wgContLang->ucfirst( wfMsgForContent( $protect ? 'protectedarticle' : 'unprotectedarticle', $this->mTitle->getPrefixedText() ) ); + $modified = $current != '' && $protect; + if($protect) $comment_type = $modified ? 'modifiedarticleprotection' : 'protectedarticle'; + else $comment_type = 'unprotectedarticle'; + $comment = $wgContLang->ucfirst( wfMsgForContent( $comment_type, $this->mTitle->getPrefixedText() ) ); if( $reason ) $comment .= ": $reason"; @@ -1737,7 +1740,7 @@ } if( $protect ) { - $log->addEntry( 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) ); + $log->addEntry( $modified ? 'modify' : 'protect', $this->mTitle, trim( $reason . " [$updated]$cascade_description$expiry_description" ) ); } else { $log->addEntry( 'unprotect', $this->mTitle, $reason ); } @@ -1795,6 +1798,12 @@ $wgOut->readOnlyPage(); return; } + + // fool-proof against Main page deletion + if( $this->mTitle->mTextform == wfMsg( 'mainpage') ) { + $wgOut->showFatalError( wfMsg( 'cannotdelete' ) ); + return; + } $wgOut->setPagetitle( wfMsg( 'confirmdelete' ) );