Index: trunk/extensions/CodeReview/CodePathRevListView.php |
— | — | @@ -1,45 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -// Special:Code/MediaWiki |
5 | | -class CodePathRevListView extends CodeRevisionListView { |
6 | | - function __construct( $repoName ) { |
7 | | - parent::__construct( $repoName ); |
8 | | - } |
9 | | - |
10 | | - function execute() { |
11 | | - global $wgOut; |
12 | | - if( !$this->mRepo ) { |
13 | | - $view = new CodeRepoListView(); |
14 | | - $view->execute(); |
15 | | - return; |
16 | | - } |
17 | | - // No path! Use regular lister! |
18 | | - if( !$this->mPath ) { |
19 | | - $view = new CodeRevisionListView( $this->mRepo->getName() ); |
20 | | - $view->execute(); |
21 | | - return; |
22 | | - } |
23 | | - $this->showForm(); |
24 | | - // Path should have a bit of length... |
25 | | - if( strlen($this->mPath) > 3 ) { |
26 | | - $pager = $this->getPager(); |
27 | | - $wgOut->addHTML( |
28 | | - $pager->getNavigationBar() . |
29 | | - $pager->getLimitForm() . |
30 | | - $pager->getBody() . |
31 | | - $pager->getNavigationBar() |
32 | | - ); |
33 | | - } |
34 | | - } |
35 | | - |
36 | | - function getPager() { |
37 | | - return new SvnPathRevTablePager( $this ); |
38 | | - } |
39 | | -} |
40 | | - |
41 | | -// Pager for CodeRevisionListView |
42 | | -class SvnPathRevTablePager extends SvnRevTablePager { |
43 | | - function getTitle() { |
44 | | - return SpecialPage::getTitleFor( 'Code', $this->mRepo->getName() . '/path' ); |
45 | | - } |
46 | | -} |
Index: trunk/extensions/CodeReview/CodeReview.php |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | |
21 | 21 | 1) Find out what revisions exist |
22 | 22 | 2) Get id/author/timestamp/notice basics |
23 | | - 3) base path helps if available |
| 23 | +3) base path helps if available |
24 | 24 | 4) get list of affected files |
25 | 25 | 5) get diffs |
26 | 26 | |
— | — | @@ -54,7 +54,6 @@ |
55 | 55 | $wgAutoloadClasses['CodeRevisionView'] = $dir . 'CodeRevisionView.php'; |
56 | 56 | $wgAutoloadClasses['CodeAuthorListView'] = $dir . 'CodeAuthorListView.php'; |
57 | 57 | $wgAutoloadClasses['CodeStatusListView'] = $dir . 'CodeStatusListView.php'; |
58 | | -$wgAutoloadClasses['CodePathRevListView'] = $dir . 'CodePathRevListView.php'; |
59 | 58 | $wgAutoloadClasses['CodeTagListView'] = $dir . 'CodeTagListView.php'; |
60 | 59 | $wgAutoloadClasses['CodeCommentsListView'] = $dir . 'CodeCommentsListView.php'; |
61 | 60 | $wgAutoloadClasses['CodeComment'] = $dir . 'CodeComment.php'; |
Index: trunk/extensions/CodeReview/SpecialCode.php |
— | — | @@ -40,10 +40,7 @@ |
41 | 41 | } elseif( $params[1] === 'comments' ) { |
42 | 42 | $view = new CodeCommentsListView( $params[0] ); |
43 | 43 | break; |
44 | | - } elseif( $params[1] === 'path' ) { |
45 | | - $view = new CodePathRevListView( $params[0] ); |
46 | | - break; |
47 | | - } else { |
| 44 | + } else { // revision details |
48 | 45 | $view = new CodeRevisionView( $params[0], $params[1] ); |
49 | 46 | break; |
50 | 47 | } |
Index: trunk/extensions/CodeReview/CodeRevisionView.php |
— | — | @@ -10,10 +10,9 @@ |
11 | 11 | $this->mRev = $this->mRepo ? $this->mRepo->getRevision( intval( $rev ) ) : null; |
12 | 12 | $this->mPreviewText = false; |
13 | 13 | # URL params... |
14 | | - $this->mAddTags = $this->splitTags( $wgRequest->getText( 'wpTag' ) ); |
15 | | - $this->mRemoveTags = $this->splitTags( $wgRequest->getText( 'wpRemoveTag' ) ); |
16 | | - $this->mStatus = $wgRequest->getText('wpStatus') ? |
17 | | - $wgRequest->getText('wpStatus') : $this->mRev->getStatus(); |
| 14 | + $this->mAddTags = $wgRequest->getText( 'wpTag' ); |
| 15 | + $this->mRemoveTags =$wgRequest->getText( 'wpRemoveTag' ); |
| 16 | + $this->mStatus = $wgRequest->getText('wpStatus'); |
18 | 17 | $this->jumpToNext = $wgRequest->getCheck('wpSaveAndNext'); |
19 | 18 | $this->mReplyTarget = $replyTarget ? |
20 | 19 | (int)$replyTarget : $wgRequest->getIntOrNull( 'wpParent' ); |
— | — | @@ -33,6 +32,9 @@ |
34 | 33 | $view->execute(); |
35 | 34 | return; |
36 | 35 | } |
| 36 | + $this->mAddTags = $this->splitTags( $this->mAddTags ); |
| 37 | + $this->mRemoveTags = $this->splitTags( $this->mRemoveTags ); |
| 38 | + $this->mStatus = $this->mStatus ? $this->mStatus : $this->mRev->getStatus(); |
37 | 39 | |
38 | 40 | $redirectOnPost = $this->checkPostings(); |
39 | 41 | if( $redirectOnPost ) { |