Index: trunk/extensions/CodeReview/CodeReview.i18n.php |
— | — | @@ -22,6 +22,7 @@ |
23 | 23 | 'code-prop-changes' => 'Status & tagging log', |
24 | 24 | 'code-desc' => '[[Special:Code|Code review tool]] with [[Special:RepoAdmin|Subversion support]]', |
25 | 25 | 'code-no-repo' => 'No repository configured!', |
| 26 | + 'code-repo-not-found' => 'Repository <b>$1</b> does not exist!', |
26 | 27 | 'code-load-diff' => 'Loading diff…', |
27 | 28 | 'code-notes' => 'recent comments', |
28 | 29 | 'code-statuschanges' => 'status changes', |
Index: trunk/extensions/CodeReview/ui/SpecialCode.php |
— | — | @@ -91,6 +91,15 @@ |
92 | 92 | $wgOut->returnToMain( null, SpecialPage::getTitleFor( 'Code' ) ); |
93 | 93 | return; |
94 | 94 | } |
| 95 | + |
| 96 | + // If a repository was specified, but it does not exist, redirect to the |
| 97 | + // repository list with an appropriate message. |
| 98 | + if ( !$view->mRepo ) { |
| 99 | + $view = new CodeRepoListView(); |
| 100 | + $wgOut->addHTML( "<p>" |
| 101 | + . wfMsg( 'code-repo-not-found', $params[0] ) |
| 102 | + . "</p>" ); |
| 103 | + } |
95 | 104 | } |
96 | 105 | $view->execute(); |
97 | 106 | |
— | — | @@ -129,7 +138,9 @@ |
130 | 139 | * of false |
131 | 140 | */ |
132 | 141 | function authorWikiUser( $author ) { |
133 | | - return $this->mRepo->authorWikiUser( $author ); |
| 142 | + if ( $this->mRepo ) |
| 143 | + return $this->mRepo->authorWikiUser( $author ); |
| 144 | + return false; |
134 | 145 | } |
135 | 146 | |
136 | 147 | function authorLink( $author, $extraParams = array() ) { |