http://www.mediawiki.org/wiki/Special:Code/MediaWiki/95930
Revision: 95930
Author: johnduhart
Date: 2011-09-01 03:56:33 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
(bug 5865) Warning on editing other user's userpage
Modified Paths:
--------------
trunk/phase3/RELEASE-NOTES-1.19
trunk/phase3/includes/EditPage.php
trunk/phase3/languages/messages/MessagesEn.php
Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19 2011-09-01 01:32:29 UTC (rev 95929)
+++ trunk/phase3/RELEASE-NOTES-1.19 2011-09-01 03:56:33 UTC (rev 95930)
@@ -51,6 +51,7 @@
* (bug 30344) Add configuration variable for setting custom priorities when
generating sitemaps
* (bug 16428) Include permalink in printable version
+* (bug 5865) Warning on editing other user's userpage
=== Bug fixes in 1.19 ===
* $wgUploadNavigationUrl should be used for file redlinks if
Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php 2011-09-01 01:32:29 UTC (rev 95929)
+++ trunk/phase3/includes/EditPage.php 2011-09-01 03:56:33 UTC (rev 95930)
@@ -1605,6 +1605,17 @@
}
}
+ $curUP = $wgUser->getUserPage();
+ $sk = $wgOut->getSkin();
+ if ( $this->mTitle->getNamespace() == NS_USER
+ && substr( $this->mTitle->getPrefixedText(), 0, strlen(
$curUP->getPrefixedText() ) ) != $curUP->getPrefixedText()
+ && $this->formtype != 'preview'
+ && $this->formtype != 'diff' )
+ {
+ $utpLink = $sk->makeKnownLinkObj(
$this->mTitle->getTalkPage(), wfMsgHtml( 'editinguserpagetalklink' ),
'action=edit' );
+ $wgOut->addHTML( wfMsgWikiHtml( 'editinguserpage',
$utpLink ) );
+ }
+
if ( wfReadOnly() ) {
$wgOut->wrapWikiMsg( "<div
id=\"mw-read-only-warning\">\n$1\n</div>", array( 'readonlywarning',
wfReadOnlyReason() ) );
} elseif ( $wgUser->isAnon() ) {
Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php 2011-09-01 01:32:29 UTC
(rev 95929)
+++ trunk/phase3/languages/messages/MessagesEn.php 2011-09-01 03:56:33 UTC
(rev 95930)
@@ -1437,6 +1437,8 @@
'edit-no-change' => 'Your edit was ignored, because no
change was made to the text.',
'edit-already-exists' => 'Could not create a new page.
It already exists.',
+'editinguserpage' => "'''Note:''' You are editing a [[Help:User page|user
page]]. To leave this user a message, $1.",
+'editinguserpagetalklink' => 'edit their talk page',
'addsection-preload' => '', # do not translate or duplicate this
message to other languages
'addsection-editintro' => '', # do not translate or duplicate this
message to other languages
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs