r77347 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77346‎ | r77347 | r77348 >
Date:22:39, 26 November 2010
Author:reedy
Status:ok
Tags:
Comment:
Flags are used twice, might aswell cache and save a function call
Modified paths:
  • /trunk/extensions/CodeReview/api/ApiRevisionUpdate.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/api/ApiRevisionUpdate.php
@@ -72,6 +72,7 @@
7373 }
7474
7575 public function getAllowedParams() {
 76+ $flags = CodeRevision::getPossibleFlags();
7677 return array(
7778 'repo' => array(
7879 ApiBase::PARAM_TYPE => 'string',
@@ -97,12 +98,12 @@
9899 'addflags' => array(
99100 ApiBase::PARAM_TYPE => 'string',
100101 ApiBase::PARAM_ISMULTI => true,
101 - ApiBase::PARAM_TYPE => CodeRevision::getPossibleFlags()
 102+ ApiBase::PARAM_TYPE => $flags
102103 ),
103104 'removeflags' => array(
104105 ApiBase::PARAM_TYPE => 'string',
105106 ApiBase::PARAM_ISMULTI => true,
106 - ApiBase::PARAM_TYPE => CodeRevision::getPossibleFlags()
 107+ ApiBase::PARAM_TYPE => $flags
107108 )
108109 );
109110 }

Status & tagging log