From: Brion Vibber
Date: Fri, 30 Apr 2004 07:18:38 +0000 (+0000)
Subject: View source fixes:
X-Git-Tag: 1.3.0beta1~181
X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=15ae9669517c5c972cd1da2136bf88c345432c48;p=lhc%2Fweb%2Fwiklou.git
View source fixes:
* Show textarea with noarticletext msg if the page is empty
* Use wikitext for the readonly message text
* XHTML fixes
---
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