Index: trunk/extensions/CodeReview/CodeRevisionView.php |
— | — | @@ -6,13 +6,18 @@ |
7 | 7 | function __construct( $repoName, $rev, $replyTarget=null ){ |
8 | 8 | global $wgRequest; |
9 | 9 | parent::__construct(); |
| 10 | + $this->mPreviewText = false; |
10 | 11 | $this->mRepo = CodeRepository::newFromName( $repoName ); |
11 | | - $this->mRev = $this->mRepo ? $this->mRepo->getRevision( intval( $rev ) ) : null; |
12 | | - $this->mPreviewText = false; |
| 12 | + # If repo is defined, fetch the revision |
| 13 | + $this->mRev = $this->mRepo ? |
| 14 | + $this->mRepo->getRevision( intval( $rev ) ) : null; |
13 | 15 | # URL params... |
14 | | - $this->mAddTags = $wgRequest->getText( 'wpTag' ); |
15 | | - $this->mRemoveTags =$wgRequest->getText( 'wpRemoveTag' ); |
| 16 | + $this->mAddTags = $this->splitTags( $wgRequest->getText( 'wpTag' ) ); |
| 17 | + $this->mRemoveTags = $this->splitTags( $wgRequest->getText( 'wpRemoveTag' ) ); |
16 | 18 | $this->mStatus = $wgRequest->getText('wpStatus'); |
| 19 | + # Get status from URL; if not set, then try the SVN revision |
| 20 | + $this->mStatus = ($this->mStatus || !$this->mRev) ? |
| 21 | + $this->mStatus : $this->mRev->getStatus(); |
17 | 22 | $this->jumpToNext = $wgRequest->getCheck('wpSaveAndNext'); |
18 | 23 | $this->mReplyTarget = $replyTarget ? |
19 | 24 | (int)$replyTarget : $wgRequest->getIntOrNull( 'wpParent' ); |
— | — | @@ -32,8 +37,6 @@ |
33 | 38 | $view->execute(); |
34 | 39 | return; |
35 | 40 | } |
36 | | - $this->mAddTags = $this->splitTags( $this->mAddTags ); |
37 | | - $this->mRemoveTags = $this->splitTags( $this->mRemoveTags ); |
38 | 41 | $this->mStatus = $this->mStatus ? $this->mStatus : $this->mRev->getStatus(); |
39 | 42 | |
40 | 43 | $redirectOnPost = $this->checkPostings(); |
— | — | @@ -102,6 +105,7 @@ |
103 | 106 | if( $changes ) { |
104 | 107 | $html .= "<h2 id='code-changes'>". wfMsgHtml( 'code-prop-changes' ) ."</h2>\n" . $changes; |
105 | 108 | } |
| 109 | + $html .= xml::closeElement( 'form' ); |
106 | 110 | |
107 | 111 | $wgOut->addHTML( $html ); |
108 | 112 | } |