r92943 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92942‎ | r92943 | r92944 >
Date:12:35, 23 July 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
* (bug 29998) Author link doesnt display the svn username whom you are trying to link to a wiki user
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/Subversion.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/Subversion.php
@@ -7,6 +7,10 @@
88 */
99 protected $mRepoPath;
1010
 11+ /**
 12+ * @param $repo string
 13+ * @return SubversionAdaptor
 14+ */
1115 public static function newFromRepo( $repo ) {
1216 global $wgSubversionProxy, $wgSubversionProxyTimeout;
1317 if ( $wgSubversionProxy ) {
@@ -19,7 +23,7 @@
2024 }
2125
2226 /**
23 - * @param $repo String Path to SVN Repo
 27+ * @param $repo String Path to SVN Repo
2428 */
2529 function __construct( $repoPath ) {
2630 $this->mRepoPath = $repoPath;
@@ -71,6 +75,7 @@
7276 svn_auth_set_parameter( SVN_AUTH_PARAM_DEFAULT_PASSWORD, $wgSubversionPassword );
7377 }
7478 }
 79+
7580 /**
7681 * Just return true for now. svn_info() is too slow to be useful...
7782 *
Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -38,7 +38,7 @@
3939 'code-tags-no-tags' => 'No tags exist in this repository.',
4040 'code-authors-text' => 'Below is a list of repo authors in order of commit name. Local wiki accounts are shown in parentheses. Data may be cached.',
4141 'code-author-haslink' => 'This author is linked to the wiki user $1',
42 - 'code-author-orphan' => 'This author has no link with a wiki account',
 42+ 'code-author-orphan' => 'Wiki user $1 has no link with a wiki account',
4343 'code-author-dolink' => 'Link this author to a wiki user:',
4444 'code-author-alterlink' => 'Change the wiki user linked to this author:',
4545 'code-author-orunlink' => 'Or unlink this wiki user:',
Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorLink.php
@@ -83,7 +83,7 @@
8484 // Unlink an author to a wiki users
8585 } elseif ( $wgRequest->getVal( 'unlink' ) ) {
8686 if ( !$this->mUser ) {
87 - $wgOut->addHTML( wfMsg( 'code-author-orphan' ) );
 87+ $wgOut->addHTML( wfMsg( 'code-author-orphan', $this->authorLink( $this->mAuthor ) ) );
8888 return;
8989 }
9090 $this->mRepo->unlinkUser( $this->mAuthor );
Index: trunk/extensions/CodeReview/ui/CodeRevisionAuthorView.php
@@ -1,6 +1,7 @@
22 <?php
33
44 class CodeRevisionAuthorView extends CodeRevisionListView {
 5+
56 function __construct( $repo, $author ) {
67 parent::__construct( $repo );
78 $this->mAuthor = $author;
@@ -13,7 +14,7 @@
1415
1516 function linkStatus() {
1617 if ( !$this->mUser ) {
17 - return wfMsg( 'code-author-orphan' );
 18+ return wfMsg( 'code-author-orphan', $this->authorLink( $this->mAuthor ) );
1819 }
1920
2021 return wfMsgHtml( 'code-author-haslink',
@@ -33,11 +34,11 @@
3435 wfMsg( 'code-author-' . ( $this->mUser ? 'un':'' ) . 'link' ) ) . ')' ;
3536 }
3637
37 - $repoLink = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ),
 38+ $repoLink = $this->skin->link( SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() ),
3839 htmlspecialchars( $this->mRepo->getName() ) );
3940 $fields = array(
4041 'code-rev-repo' => $repoLink,
41 - 'code-rev-author' => $this->authorLink( $this->mAuthor ),
 42+ 'code-rev-author' => $this->mAuthor,
4243 );
4344
4445 $wgOut->addHTML( $this->formatMetaData( $fields ) . $linkInfo );

Follow-up revisions

RevisionCommit summaryAuthorDate
r93046Fix message fail from r92943reedy09:18, 25 July 2011

Comments

#Comment by Seb35 (talk | contribs)   02:41, 25 July 2011

The message shouldn’t phrased "Wiki user $1 has no link with a wiki account" but "SVN user/Author $1 has no link with a wiki account". This is really the SVN user given in parameter and not the wiki user (which don’t exist or at least is not linked).

#Comment by Reedy (talk | contribs)   09:15, 25 July 2011

Errr, yeah....

Status & tagging log