From: Brion Vibber Date: Tue, 9 Sep 2003 05:46:22 +0000 (+0000) Subject: View source in read-only message when db is locked X-Git-Tag: 1.1.0~283 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=10bfbe1aeca87fc7938b9007d1faa141d5fa7d87;p=lhc%2Fweb%2Fwiklou.git View source in read-only message when db is locked --- diff --git a/includes/EditPage.php b/includes/EditPage.php index 7f430d6204..f85a42420b 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -42,7 +42,7 @@ class EditPage { if( isset( $wpSave ) or isset( $wpPreview ) ) { $this->editForm( "preview" ); } else { - $wgOut->readOnlyPage(); + $wgOut->readOnlyPage( $this->mArticle->getContent() ); } return; } diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 849fb84d6f..f43d8d4962 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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 .= "

\n"; + } + $this->addHTML( $text ); $this->returnToMain( false ); }