}
wfProfileOut( $fname );
$wgOut->setRobotpolicy( 'noindex,nofollow' );
- return wfMsg( 'noarticletext' );
+ return wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' );
} else {
$this->loadContent( $noredir );
# check if we're displaying a [[User talk:x.x.x.x]] anonymous talk page
* @access public
*/
function info() {
- global $wgLang, $wgOut, $wgAllowPageInfo;
+ global $wgLang, $wgOut, $wgAllowPageInfo, $wgUser;
$fname = 'Article::info';
if ( !$wgAllowPageInfo ) {
# first, see if the page exists at all.
$exists = $page->getArticleId() != 0;
if( !$exists ) {
- $wgOut->addHTML( wfMsg('noarticletext') );
+ $wgOut->addHTML( wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ) );
} else {
$dbr =& $this->getDB( DB_SLAVE );
$wl_clause = array(
* @return string HTML
*/
function getDiff() {
+ global $wgUser;
+
require_once( 'DifferenceEngine.php' );
$oldtext = $this->mArticle->fetchContent();
$newtext = $this->mArticle->replaceSection(
$this->section, $this->textbox1, $this->summary, $this->edittime );
$oldtitle = wfMsg( 'currentrev' );
$newtitle = wfMsg( 'yourtext' );
- if ( $oldtext != wfMsg( 'noarticletext' ) || $newtext != '' ) {
+ if ( $oldtext != wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' ) || $newtext != '' ) {
$difftext = DifferenceEngine::getDiff( $oldtext, $newtext, $oldtitle, $newtitle );
}
if( is_string( $source ) ) {
if( strcmp( $source, '' ) == 0 ) {
- $source = wfMsg( 'noarticletext' );
+ $source = wfMsg( $wgUser->isLoggedIn() ? 'noarticletext' : 'noarticletextanon' );
}
$rows = $wgUser->getOption( 'rows' );
$cols = $wgUser->getOption( 'cols' );
'talkpagetext' => '<!-- MediaWiki:talkpagetext -->',
'anontalkpagetext' => "----''This is the discussion page for an anonymous user who has not created an account yet or who does not use it. We therefore have to use the numerical [[IP address]] to identify him/her. Such an IP address can be shared by several users. If you are an anonymous user and feel that irrelevant comments have been directed at you, please [[Special:Userlogin|create an account or log in]] to avoid future confusion with other anonymous users.'' ",
'noarticletext' => 'There is currently no text in this page, you can [[{{ns:special}}:Search/{{PAGENAME}}|search for this page title]] in other pages or [{{fullurl:{{NAMESPACE}}:{{PAGENAME}}|action=edit}} edit this page].',
+'noarticletextanon' => '{{int:noarticletext}}',
'clearyourcache' => "'''Note:''' After saving, you may have to bypass your browser's cache to see the changes. '''Mozilla / Firefox / Safari:''' hold down ''Shift'' while clicking ''Reload'', or press ''Ctrl-Shift-R'' (''Cmd-Shift-R'' on Apple Mac); '''IE:''' hold ''Ctrl'' while clicking ''Refresh'', or press ''Ctrl-F5''; '''Konqueror:''': simply click the ''Reload'' button, or press ''F5''; '''Opera''' users may need to completely clear their cache in ''Tools→Preferences''.",
'usercssjsyoucanpreview' => "<strong>Tip:</strong> Use the 'Show preview' button to test your new CSS/JS before saving.",
'usercsspreview' => "'''Remember that you are only previewing your user CSS, it has not yet been saved!'''",