Page MenuHomePhabricator

D17487.id.diff
No OneTemporary

D17487.id.diff

diff --git a/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php b/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php
--- a/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php
+++ b/src/applications/badges/conduit/PhabricatorBadgesEditConduitAPIMethod.php
@@ -4,7 +4,7 @@
extends PhabricatorEditEngineAPIMethod {
public function getAPIMethodName() {
- return 'badges.edit';
+ return 'badge.edit';
}
public function newEditEngine() {
diff --git a/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php b/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php
--- a/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php
+++ b/src/applications/badges/conduit/PhabricatorBadgesSearchConduitAPIMethod.php
@@ -4,7 +4,7 @@
extends PhabricatorSearchEngineAPIMethod {
public function getAPIMethodName() {
- return 'badges.search';
+ return 'badge.search';
}
public function newSearchEngine() {
diff --git a/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php b/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php
--- a/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php
+++ b/src/applications/badges/lipsum/PhabricatorBadgesAwardTestDataGenerator.php
@@ -26,7 +26,7 @@
'objectIdentifier' => $badge_phid,
);
- $result = id(new ConduitCall('badges.edit', $params))
+ $result = id(new ConduitCall('badge.edit', $params))
->setUser($author)
->execute();
diff --git a/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php b/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php
--- a/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php
+++ b/src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php
@@ -40,7 +40,7 @@
'transactions' => $xactions,
);
- $result = id(new ConduitCall('badges.edit', $params))
+ $result = id(new ConduitCall('badge.edit', $params))
->setUser($author)
->execute();
diff --git a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php
--- a/src/applications/badges/query/PhabricatorBadgesSearchEngine.php
+++ b/src/applications/badges/query/PhabricatorBadgesSearchEngine.php
@@ -24,6 +24,7 @@
id(new PhabricatorSearchCheckboxesField())
->setKey('qualities')
->setLabel(pht('Quality'))
+ ->setEnableForConduit(false)
->setOptions(PhabricatorBadgesQuality::getDropdownQualityMap()),
id(new PhabricatorSearchCheckboxesField())
->setKey('statuses')
diff --git a/src/applications/search/field/PhabricatorSearchField.php b/src/applications/search/field/PhabricatorSearchField.php
--- a/src/applications/search/field/PhabricatorSearchField.php
+++ b/src/applications/search/field/PhabricatorSearchField.php
@@ -19,6 +19,8 @@
private $description;
private $isHidden;
+ private $enableForConduit = true;
+
/* -( Configuring Fields )------------------------------------------------- */
@@ -333,6 +335,10 @@
* @task conduit
*/
final public function getConduitParameterType() {
+ if (!$this->getEnableForConduit()) {
+ return false;
+ }
+
$type = $this->newConduitParameterType();
if ($type) {
@@ -367,6 +373,15 @@
$this->getConduitKey());
}
+ final public function setEnableForConduit($enable) {
+ $this->enableForConduit = $enable;
+ return $this;
+ }
+
+ final public function getEnableForConduit() {
+ return $this->enableForConduit;
+ }
+
/* -( Utility Methods )----------------------------------------------------- */

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 22, 9:12 AM (2 w, 4 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7409322
Default Alt Text
D17487.id.diff (3 KB)

Event Timeline