r14768 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14767‎ | r14768 | r14769 >
Date:06:55, 15 June 2006
Author:robchurch
Status:old
Tags:
Comment:
(bug 5865) Show warning when editing another users' user page and provide a link to edit their talk page instead
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/languages/Messages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -814,6 +814,15 @@
815815 }
816816 }
817817
 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+
818827 if( wfReadOnly() ) {
819828 $wgOut->addWikiText( wfMsg( 'readonlywarning' ) );
820829 } elseif( $wgUser->isAnon() && $this->formtype != 'preview' ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -496,6 +496,8 @@
497497 * (bug 6296) Update to Indonesian localisation (id) #21
498498 * Introduce EditFormPreloadText hook, see docs/hooks.txt for more information
499499 * (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
500502
501503 == Compatibility ==
502504
Index: trunk/phase3/languages/Messages.php
@@ -468,6 +468,8 @@
469469 'showdiff' => 'Show changes',
470470 'anoneditwarning' => "'''Warning:''' You are not logged in. Your IP address will be recorded in this page's edit history.",
471471 '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',
472474 'missingcommenttext' => 'Please enter a comment below.',
473475 'blockedtitle' => 'User is blocked',
474476 'blockedtext' => 'Your user name or IP address has been blocked by $1.

Follow-up revisions

RevisionCommit summaryAuthorDate
r14769Revert r14768, it's broken.robchurch07:14, 15 June 2006
r95930(bug 5865) Warning on editing other user's userpagejohnduhart03:56, 1 September 2011

Status & tagging log