*/
private function showIntro() {
global $wgOut, $wgUser;
- if( $this->suppressIntro ) return;
+ if( $this->suppressIntro )
+ return;
+
+ # Show a warning message when someone creates/edits a user (talk) page but the user does not exists
+ if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
+ $parts = explode( '/', $this->mTitle->getText(), 2 );
+ $username = $parts[0];
+ $id = User::idFromName( $username );
+ $ip = User::isIP( $username );
+
+ if ( $id == 0 && !$ip ) {
+ $wgOut->addWikiText( '<div class="mw-userpage-userdoesnotexist error">' . wfMsg( 'userpage-userdoesnotexist', $username ) . '</div>' );
+ }
+ }
+
if( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
if( $wgUser->isLoggedIn() ) {
- $wgOut->addWikiText( wfMsg( 'newarticletext' ) );
+ $wgOut->addWikiText( '<div class="mw-newarticletext">' . wfMsg( 'newarticletext' ) . '</div>' );
} else {
- $wgOut->addWikiText( wfMsg( 'newarticletextanon' ) );
+ $wgOut->addWikiText( '<div class="mw-newarticletextanon">' . wfMsg( 'newarticletextanon' ) . '</div>' );
}
$this->showDeletionLog( $wgOut );
}
}
-
+
/**
* Attempt to show a custom editing introduction, if supplied
*
if ( $this->mMetaData != "" ) $toparse .= "\n" . $this->mMetaData ;
$parserOptions->setTidy(true);
+ $parserOptions->enableLimitReport();
$parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ) ."\n\n",
$this->mTitle, $parserOptions );