Index: trunk/extensions/CodeReview/ui/CodeRevisionCommitter.php |
— | — | @@ -65,14 +65,14 @@ |
66 | 66 | $dbw->begin(); |
67 | 67 | // Change the status if allowed |
68 | 68 | $statusChanged = false; |
69 | | - if ( $this->validPost( 'codereview-set-status' ) && $this->mRev->isValidStatus( $status ) ) { |
| 69 | + if ( $this->mRev->isValidStatus( $status ) && $this->validPost( 'codereview-set-status' ) ) { |
70 | 70 | $statusChanged = $this->mRev->setStatus( $status, $wgUser ); |
71 | 71 | } |
72 | 72 | $addTags = $removeTags = array(); |
73 | | - if ( $this->validPost( 'codereview-add-tag' ) && count( $addTags ) ) { |
| 73 | + if ( count( $addTags ) && $this->validPost( 'codereview-add-tag' ) ) { |
74 | 74 | $validAddTags = $addTags; |
75 | 75 | } |
76 | | - if ( $this->validPost( 'codereview-remove-tag' ) && count( $removeTags ) ) { |
| 76 | + if ( count( $removeTags ) && $this->validPost( 'codereview-remove-tag' ) ) { |
77 | 77 | $validRemoveTags = $removeTags; |
78 | 78 | } |
79 | 79 | // If allowed to change any tags, then do so |
— | — | @@ -80,12 +80,12 @@ |
81 | 81 | $this->mRev->changeTags( $validAddTags, $validRemoveTags, $wgUser ); |
82 | 82 | } |
83 | 83 | // Add any signoffs |
84 | | - if ( $this->validPost( 'codereview-signoff' ) && count( $signoffFlags ) ) { |
| 84 | + if ( count( $signoffFlags ) && $this->validPost( 'codereview-signoff' ) ) { |
85 | 85 | $this->mRev->addSignoff( $wgUser, $signoffFlags ); |
86 | 86 | } |
87 | 87 | // Add any comments |
88 | 88 | $commentAdded = false; |
89 | | - if ( $this->validPost( 'codereview-post-comment' ) && strlen( $commentText ) ) { |
| 89 | + if ( strlen( $commentText ) && $this->validPost( 'codereview-post-comment' ) ) { |
90 | 90 | // $isPreview = $wgRequest->getCheck( 'wpPreview' ); |
91 | 91 | $commentId = $this->mRev->saveComment( $commentText, $review, $parent ); |
92 | 92 | |