Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -1437,6 +1437,8 @@ |
1438 | 1438 | 'edit-no-change' => 'Your edit was ignored, because no change was made to the text.', |
1439 | 1439 | 'edit-already-exists' => 'Could not create a new page. |
1440 | 1440 | It already exists.', |
| 1441 | +'editinguserpage' => "'''Note:''' You are editing a [[Help:User page|user page]]. To leave this user a message, $1.", |
| 1442 | +'editinguserpagetalklink' => 'edit their talk page', |
1441 | 1443 | 'addsection-preload' => '', # do not translate or duplicate this message to other languages |
1442 | 1444 | 'addsection-editintro' => '', # do not translate or duplicate this message to other languages |
1443 | 1445 | |
Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | * (bug 30344) Add configuration variable for setting custom priorities when |
53 | 53 | generating sitemaps |
54 | 54 | * (bug 16428) Include permalink in printable version |
| 55 | +* (bug 5865) Warning on editing other user's userpage |
55 | 56 | |
56 | 57 | === Bug fixes in 1.19 === |
57 | 58 | * $wgUploadNavigationUrl should be used for file redlinks if |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -1605,6 +1605,17 @@ |
1606 | 1606 | } |
1607 | 1607 | } |
1608 | 1608 | |
| 1609 | + $curUP = $wgUser->getUserPage(); |
| 1610 | + $sk = $wgOut->getSkin(); |
| 1611 | + if ( $this->mTitle->getNamespace() == NS_USER |
| 1612 | + && substr( $this->mTitle->getPrefixedText(), 0, strlen( $curUP->getPrefixedText() ) ) != $curUP->getPrefixedText() |
| 1613 | + && $this->formtype != 'preview' |
| 1614 | + && $this->formtype != 'diff' ) |
| 1615 | + { |
| 1616 | + $utpLink = $sk->makeKnownLinkObj( $this->mTitle->getTalkPage(), wfMsgHtml( 'editinguserpagetalklink' ), 'action=edit' ); |
| 1617 | + $wgOut->addHTML( wfMsgWikiHtml( 'editinguserpage', $utpLink ) ); |
| 1618 | + } |
| 1619 | + |
1609 | 1620 | if ( wfReadOnly() ) { |
1610 | 1621 | $wgOut->wrapWikiMsg( "<div id=\"mw-read-only-warning\">\n$1\n</div>", array( 'readonlywarning', wfReadOnlyReason() ) ); |
1611 | 1622 | } elseif ( $wgUser->isAnon() ) { |