@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove "Application" field from ConduitSearchEngine

Summary: Fixes T9063. Removes the "Application" field from the search because it was largely redundant with the 'Name Contains' field.

Test Plan: Went to `/conduit/query/modern/`, clicked on `Edit Query` and noted that there is no "Application" field anymore. The 'Name Contains' field still works however.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley, yelirekim

Maniphest Tasks: T9063

Differential Revision: https://secure.phabricator.com/D16602

Josh Cox 6649b0ce fc821188

-38
-16
src/applications/conduit/query/PhabricatorConduitMethodQuery.php
··· 21 21 return $this; 22 22 } 23 23 24 - public function withApplicationNames(array $application_names) { 25 - $this->applicationNames = $application_names; 26 - return $this; 27 - } 28 - 29 24 public function withIsStable($is_stable) { 30 25 $this->isStable = $is_stable; 31 26 return $this; ··· 81 76 foreach ($methods as $key => $method) { 82 77 $keep = idx($status, $method->getMethodStatus()); 83 78 if (!$keep) { 84 - unset($methods[$key]); 85 - } 86 - } 87 - } 88 - 89 - if ($this->applicationNames) { 90 - $map = array_fuse($this->applicationNames); 91 - foreach ($methods as $key => $method) { 92 - $needle = $method->getApplicationName(); 93 - $needle = phutil_utf8_strtolower($needle); 94 - if (empty($map[$needle])) { 95 79 unset($methods[$key]); 96 80 } 97 81 }
-22
src/applications/conduit/query/PhabricatorConduitSearchEngine.php
··· 21 21 $saved->setParameter('isStable', $request->getStr('isStable')); 22 22 $saved->setParameter('isUnstable', $request->getStr('isUnstable')); 23 23 $saved->setParameter('isDeprecated', $request->getStr('isDeprecated')); 24 - 25 - $saved->setParameter( 26 - 'applicationNames', 27 - $request->getStrList('applicationNames')); 28 - 29 24 $saved->setParameter('nameContains', $request->getStr('nameContains')); 30 25 31 26 return $saved; ··· 39 34 $query->withIsDeprecated($saved->getParameter('isDeprecated')); 40 35 $query->withIsInternal(false); 41 36 42 - $names = $saved->getParameter('applicationNames', array()); 43 - if ($names) { 44 - $query->withApplicationNames($names); 45 - } 46 - 47 37 $contains = $saved->getParameter('nameContains'); 48 38 if (strlen($contains)) { 49 39 $query->withNameContains($contains); ··· 62 52 ->setLabel(pht('Name Contains')) 63 53 ->setName('nameContains') 64 54 ->setValue($saved->getParameter('nameContains'))); 65 - 66 - $names = $saved->getParameter('applicationNames', array()); 67 - $form 68 - ->appendChild( 69 - id(new AphrontFormTextControl()) 70 - ->setLabel(pht('Applications')) 71 - ->setName('applicationNames') 72 - ->setValue(implode(', ', $names)) 73 - ->setCaption( 74 - pht( 75 - 'Example: %s', 76 - phutil_tag('tt', array(), 'differential, paste')))); 77 55 78 56 $is_stable = $saved->getParameter('isStable'); 79 57 $is_unstable = $saved->getParameter('isUnstable');