r76930 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76929‎ | r76930 | r76931 >
Date:00:42, 18 November 2010
Author:reedy
Status:ok
Tags:
Comment:
bug 25940 Add API module(s) to add comments/set revision status

Also do flags as followup to r76922

Also do some function commmenting in CodeRevision.php
Modified paths:
  • /trunk/extensions/CodeReview/api/ApiRevisionUpdate.php (modified) (history)
  • /trunk/extensions/CodeReview/backend/CodeRevision.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/backend/CodeRevision.php
@@ -137,14 +137,27 @@
138138 return $this->mCommonPath;
139139 }
140140
 141+ /*
 142+ * List of all possible states a CodeRevision can be in
 143+ * return Array
 144+ */
141145 public static function getPossibleStates() {
142146 return array( 'new', 'fixme', 'reverted', 'resolved', 'ok', 'verified', 'deferred', 'old' );
143147 }
144 -
 148+
 149+ /*
 150+ * List of all flags a user can mark themself as having done to a revision
 151+ * Return Array
 152+ */
145153 public static function getPossibleFlags() {
146154 return array( 'inspected', 'tested' );
147155 }
148156
 157+ /**
 158+ * Returns whether the provided status is valid
 159+ * @param String $status
 160+ * @return bool
 161+ */
149162 public function isValidStatus( $status ) {
150163 return in_array( $status, self::getPossibleStates(), true );
151164 }
Index: trunk/extensions/CodeReview/api/ApiRevisionUpdate.php
@@ -49,7 +49,7 @@
5050 $params['status'],
5151 $params['addtags'],
5252 $params['removeTags'],
53 - array(), //Signoff Flags to be done/exposed at later date
 53+ $params['flags'],
5454 $params['comment']
5555 );
5656
@@ -88,6 +88,11 @@
8989 ApiBase::PARAM_TYPE => 'string',
9090 ApiBase::PARAM_ISMULTI => true,
9191 ),
 92+ 'flags' => array(
 93+ ApiBase::PARAM_TYPE => 'string',
 94+ ApiBase::PARAM_ISMULTI => true,
 95+ ApiBase::PARAM_TYPE => CodeRevision::getPossibleFlags()
 96+ )
9297 );
9398 }
9499
@@ -99,6 +104,7 @@
100105 'status' => 'Status to set the revision to',
101106 'addtags' => 'Tags to be added to the revision',
102107 'removetags' => 'Tags to be removed from the revision',
 108+ 'flags' => 'Code Signoff flags to assign to the revision by the current user',
103109 );
104110 }
105111

Follow-up revisions

RevisionCommit summaryAuthorDate
r77326Document functions added in r75327, r77302 (sign-off feature), fix comments a...catrope12:18, 26 November 2010
r79631Followup r76930, drop s from table name checkreedy22:51, 4 January 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r76905Prequisite to bug 25940 (Add API module(s) to add comments/set revision status)...reedy21:01, 17 November 2010
r76912More for bug 25940 (Add API module(s) to add comments/set revision status)...reedy22:45, 17 November 2010
r76922bug 25940 Add API module(s) to add comments/set revision status...reedy00:00, 18 November 2010

Status & tagging log