View source in read-only message when db is locked
This commit is contained in:
parent
62536406e2
commit
10bfbe1aec
2 changed files with 10 additions and 2 deletions
|
|
@ -42,7 +42,7 @@ class EditPage {
|
|||
if( isset( $wpSave ) or isset( $wpPreview ) ) {
|
||||
$this->editForm( "preview" );
|
||||
} else {
|
||||
$wgOut->readOnlyPage();
|
||||
$wgOut->readOnlyPage( $this->mArticle->getContent() );
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -488,7 +488,7 @@ class OutputPage {
|
|||
exit();
|
||||
}
|
||||
|
||||
function readOnlyPage()
|
||||
function readOnlyPage( $source = "" )
|
||||
{
|
||||
global $wgUser, $wgReadOnlyFile;
|
||||
|
||||
|
|
@ -498,6 +498,14 @@ class OutputPage {
|
|||
|
||||
$reason = implode( "", file( $wgReadOnlyFile ) );
|
||||
$text = str_replace( "$1", $reason, wfMsg( "readonlytext" ) );
|
||||
|
||||
if($source) {
|
||||
$rows = $wgUser->getOption( "rows" );
|
||||
$cols = $wgUser->getOption( "cols" );
|
||||
$text .= "</p>\n<textarea cols='$cols' rows='$rows' readonly>" .
|
||||
htmlspecialchars( $source ) . "\n</textarea>";
|
||||
}
|
||||
|
||||
$this->addHTML( $text );
|
||||
$this->returnToMain( false );
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue