r71825 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r71824‎ | r71825 | r71826 >
Date:23:38, 27 August 2010
Author:reedy
Status:ok
Tags:
Comment:
Bug 24840 - CR should give some sort of error messages when revision can't be found

Tweak message quoting and use '''
Modified paths:
  • /trunk/extensions/CodeReview/CodeReview.i18n.php (modified) (history)
  • /trunk/extensions/CodeReview/ui/CodeRevisionView.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeReview.i18n.php
@@ -23,7 +23,7 @@
2424 'code-prop-changes' => 'Status & tagging log',
2525 'codereview-desc' => '[[Special:Code|Code review tool]] with [[Special:RepoAdmin|Subversion support]]',
2626 'code-no-repo' => 'No repository configured!',
27 - 'code-repo-not-found' => 'Repository <b>$1</b> does not exist!',
 27+ 'code-repo-not-found' => "Repository '''$1''' does not exist!",
2828 'code-load-diff' => 'Loading diff…',
2929 'code-notes' => 'recent comments',
3030 'code-statuschanges' => 'status changes',
@@ -81,6 +81,7 @@
8282 'code-rev-diff-too-large' => 'The diff is too large to display.',
8383 'code-rev-purge-link' => 'purge',
8484 'code-rev-total' => 'Total number of results: $1',
 85+ 'code-rev-not-found' => "Revision '''$1''' does not exist!",
8586 'code-status-new' => 'new',
8687 'code-status-fixme' => 'fixme',
8788 'code-status-reverted' => 'reverted',
Index: trunk/extensions/CodeReview/ui/CodeRevisionView.php
@@ -7,8 +7,9 @@
88 global $wgRequest;
99 parent::__construct();
1010 $this->mRepo = CodeRepository::newFromName( $repoName );
 11+ $this->mRevId = intval( ltrim( $rev, 'r' ) );
1112 $this->mRev = $this->mRepo ?
12 - $this->mRepo->getRevision( intval( ltrim( $rev, 'r' ) ) ) : null;
 13+ $this->mRepo->getRevision( $this->mRevId ) : null;
1314 $this->mPreviewText = false;
1415 # Search path for navigation links
1516 $this->mPath = htmlspecialchars( trim( $wgRequest->getVal( 'path' ) ) );
@@ -37,6 +38,7 @@
3839 return;
3940 }
4041 if ( !$this->mRev ) {
 42+ $wgOut->addWikiMsg( 'code-rev-not-found', $this->mRevId );
4143 $view = new CodeRevisionListView( $this->mRepo->getName() );
4244 $view->execute();
4345 return;

Status & tagging log