$text = '';
if( !$this->mTitle->exists() ) {
-
- # If requested, preload some text.
- $text = $this->getPreloadedText( $preload );
-
+ if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ # If this is a system message, get the default text.
+ $text = wfMsgWeirdKey ( $this->mTitle->getText() ) ;
+ } else {
+ # If requested, preload some text.
+ $text = $this->getPreloadedText( $preload );
+ }
# We used to put MediaWiki:Newarticletext here if
# $text was empty at this point.
# This is now shown above the edit box instead.
global $wgUser, $wgReadOnlyFile, $wgReadOnly, $wgTitle;
$skin = $wgUser->getSkin();
+ error_log("readOnlyPage( '$source', '$protected')\n");
+
$this->setRobotpolicy( 'noindex,nofollow' );
$this->setArticleRelated( false );
# Determine if protection is due to the page being a system message
# and show an appropriate explanation
- if( $wgTitle->getNamespace() == NS_MEDIAWIKI && !$wgUser->isAllowed( 'editinterface' ) ) {
+ if( $wgTitle->getNamespace() == NS_MEDIAWIKI ) {
$this->addWikiText( wfMsg( 'protectedinterface' ) );
} else {
$this->addWikiText( wfMsg( 'protectedpagetext' ) );
if( is_string( $source ) ) {
$this->addWikiText( wfMsg( 'viewsourcetext' ) );
- if( $source === '' ) {
- global $wgTitle;
- if ( $wgTitle->getNamespace() == NS_MEDIAWIKI ) {
- $source = wfMsgWeirdKey ( $wgTitle->getText() );
- } else {
- $source = '';
- }
- }
$rows = $wgUser->getIntOption( 'rows' );
$cols = $wgUser->getIntOption( 'cols' );
-
$text = "\n<textarea name='wpTextbox1' id='wpTextbox1' cols='$cols' rows='$rows' readonly='readonly'>" .
htmlspecialchars( $source ) . "\n</textarea>";
$this->addHTML( $text );