From 15ae9669517c5c972cd1da2136bf88c345432c48 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Fri, 30 Apr 2004 07:18:38 +0000 Subject: [PATCH] View source fixes: * Show textarea with noarticletext msg if the page is empty * Use wikitext for the readonly message text * XHTML fixes --- includes/OutputPage.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 1e0e423384..f344fe404c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -517,7 +517,7 @@ class OutputPage { wfAbruptExit(); } - function readOnlyPage( $source = "", $protected = false ) + function readOnlyPage( $source = null, $protected = false ) { global $wgUser, $wgReadOnlyFile; @@ -530,13 +530,16 @@ class OutputPage { } else { $this->setPageTitle( wfMsg( "readonly" ) ); $reason = file_get_contents( $wgReadOnlyFile ); - $this->addHTML( wfMsg( "readonlytext", $reason ) ); + $this->addWikiText( wfMsg( "readonlytext", $reason ) ); } - if($source) { + if( is_string( $source ) ) { + if( strcmp( $source, "" ) == 0 ) { + $source = wfMsg( "noarticletext" ); + } $rows = $wgUser->getOption( "rows" ); $cols = $wgUser->getOption( "cols" ); - $text = "

\n"; $this->addHTML( $text ); } -- 2.20.1