Index: trunk/extensions/CodeReview/api/ApiCodeComments.php |
— | — | @@ -38,6 +38,8 @@ |
39 | 39 | if ( is_null( $params['repo'] ) ) |
40 | 40 | $this->dieUsageMsg( array( 'missingparam', 'repo' ) ); |
41 | 41 | $this->props = array_flip( $params['prop'] ); |
| 42 | + if ( isset( $this->props['revision'] ) ) |
| 43 | + $this->setWarning( 'ccprop=revision has been deprecated in favor of ccprop=status' ); |
42 | 44 | |
43 | 45 | $listview = new CodeCommentsListView( $params['repo'] ); |
44 | 46 | if ( is_null( $listview->getRepo() ) ) |
— | — | @@ -82,7 +84,7 @@ |
83 | 85 | $item['timestamp'] = wfTimestamp( TS_ISO_8601, $row->cc_timestamp ); |
84 | 86 | if ( isset( $this->props['user'] ) ) |
85 | 87 | $item['user'] = $row->cc_user_text; |
86 | | - if ( isset( $this->props['revision'] ) ) |
| 88 | + if ( isset( $this->props['revision'] ) || isset( $this->props['status'] ) ) |
87 | 89 | $item['status'] = $row->cr_status; |
88 | 90 | if ( isset( $this->props['text'] ) ) |
89 | 91 | ApiResult::setContent( $item, $row->cc_text ); |
— | — | @@ -104,13 +106,14 @@ |
105 | 107 | ), |
106 | 108 | 'prop' => array ( |
107 | 109 | ApiBase :: PARAM_ISMULTI => true, |
108 | | - ApiBase :: PARAM_DFLT => 'timestamp|user|revision|revid', |
| 110 | + ApiBase :: PARAM_DFLT => 'timestamp|user|status|revid', |
109 | 111 | ApiBase :: PARAM_TYPE => array ( |
110 | 112 | 'timestamp', |
111 | 113 | 'user', |
112 | | - 'revision', |
| 114 | + 'status', |
113 | 115 | 'text', |
114 | 116 | 'revid', |
| 117 | + 'revision', |
115 | 118 | ), |
116 | 119 | ), |
117 | 120 | ); |
— | — | @@ -121,7 +124,7 @@ |
122 | 125 | 'repo' => 'Name of the repository', |
123 | 126 | 'limit' => 'How many comments to return', |
124 | 127 | 'start' => 'Timestamp to start listing at', |
125 | | - 'prop' => 'Which properties to return', |
| 128 | + 'prop' => 'Which properties to return. revision is a deprecated alias for status', |
126 | 129 | ); |
127 | 130 | } |
128 | 131 | |