Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -814,6 +814,15 @@ |
815 | 815 | } |
816 | 816 | } |
817 | 817 | |
| 818 | + $curUP = $wgUser->getUserPage(); |
| 819 | + $editingOTP = substr( $this->mTitle->getPrefixedText(), 0, strlen( $curUP->getPrefixedText() ) ) != $curUP->getPrefixedText() |
| 820 | + && $this->formtype != 'preview' |
| 821 | + && $this->formtype != 'diff'; |
| 822 | + if( $editingOTP ) { |
| 823 | + $utpLink = $sk->makeKnownLinkObj( $this->mTitle->getTalkPage(), wfMsgHtml( 'editinguserpagetalklink' ), 'action=edit' ); |
| 824 | + $wgOut->addHtml( wfMsgWikiHtml( 'editinguserpage', $utpLink ) ); |
| 825 | + } |
| 826 | + |
818 | 827 | if( wfReadOnly() ) { |
819 | 828 | $wgOut->addWikiText( wfMsg( 'readonlywarning' ) ); |
820 | 829 | } elseif( $wgUser->isAnon() && $this->formtype != 'preview' ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -496,6 +496,8 @@ |
497 | 497 | * (bug 6296) Update to Indonesian localisation (id) #21 |
498 | 498 | * Introduce EditFormPreloadText hook, see docs/hooks.txt for more information |
499 | 499 | * (bug 6095) Introduce RunUnknownJob hook, see docs/hooks.txt for more information |
| 500 | +* (bug 5865) Show warning when editing another users' user page and provide a link to edit |
| 501 | + their talk page instead |
500 | 502 | |
501 | 503 | == Compatibility == |
502 | 504 | |
Index: trunk/phase3/languages/Messages.php |
— | — | @@ -468,6 +468,8 @@ |
469 | 469 | 'showdiff' => 'Show changes', |
470 | 470 | 'anoneditwarning' => "'''Warning:''' You are not logged in. Your IP address will be recorded in this page's edit history.", |
471 | 471 | 'missingsummary' => "'''Reminder:''' You have not provided an edit summary. If you click Save again, your edit will be saved without one.", |
| 472 | +'editinguserpage' => "'''Note:''' You are editing a [[Help:User page|user page]]. To leave this user a message, $1.", |
| 473 | +'editinguserpagetalklink' => 'edit their talk page', |
472 | 474 | 'missingcommenttext' => 'Please enter a comment below.', |
473 | 475 | 'blockedtitle' => 'User is blocked', |
474 | 476 | 'blockedtext' => 'Your user name or IP address has been blocked by $1. |