r65756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r65755‎ | r65756 | r65757 >
Date:19:13, 1 May 2010
Author:catrope
Status:ok
Tags:
Comment:
CodeReview: (bug 23367) Deprecate ccprop=revision in favor of ccprop=status in list=codecomments . Old prop kept for backward compatibility
Modified paths:
  • /trunk/extensions/CodeReview/api/ApiCodeComments.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/api/ApiCodeComments.php
@@ -38,6 +38,8 @@
3939 if ( is_null( $params['repo'] ) )
4040 $this->dieUsageMsg( array( 'missingparam', 'repo' ) );
4141 $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' );
4244
4345 $listview = new CodeCommentsListView( $params['repo'] );
4446 if ( is_null( $listview->getRepo() ) )
@@ -82,7 +84,7 @@
8385 $item['timestamp'] = wfTimestamp( TS_ISO_8601, $row->cc_timestamp );
8486 if ( isset( $this->props['user'] ) )
8587 $item['user'] = $row->cc_user_text;
86 - if ( isset( $this->props['revision'] ) )
 88+ if ( isset( $this->props['revision'] ) || isset( $this->props['status'] ) )
8789 $item['status'] = $row->cr_status;
8890 if ( isset( $this->props['text'] ) )
8991 ApiResult::setContent( $item, $row->cc_text );
@@ -104,13 +106,14 @@
105107 ),
106108 'prop' => array (
107109 ApiBase :: PARAM_ISMULTI => true,
108 - ApiBase :: PARAM_DFLT => 'timestamp|user|revision|revid',
 110+ ApiBase :: PARAM_DFLT => 'timestamp|user|status|revid',
109111 ApiBase :: PARAM_TYPE => array (
110112 'timestamp',
111113 'user',
112 - 'revision',
 114+ 'status',
113115 'text',
114116 'revid',
 117+ 'revision',
115118 ),
116119 ),
117120 );
@@ -121,7 +124,7 @@
122125 'repo' => 'Name of the repository',
123126 'limit' => 'How many comments to return',
124127 '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',
126129 );
127130 }
128131

Status & tagging log