@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.

Fix documentation behaviors for the new proxy functions for custom datasource fields

Summary: Ref T13090. The doc string in "any()" wasn't specified correctly and the help page wasn't getting enough supporting data to build properly.

Test Plan: Viewed "Reference: Advanced Functions" for a custom datasource field and got more helpful help.

Maniphest Tasks: T13090

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

+25 -3
+18 -2
src/applications/typeahead/controller/PhabricatorTypeaheadFunctionHelpController.php
··· 19 19 return new Aphront404Response(); 20 20 } 21 21 22 - $source = $sources[$class]; 22 + $raw_parameters = $request->getStr('parameters'); 23 + if ($raw_parameters) { 24 + $parameters = phutil_json_decode($raw_parameters); 25 + } else { 26 + $parameters = array(); 27 + } 23 28 24 - $application_class = $source->getDatasourceApplicationClass(); 29 + $source = id(clone $sources[$class]) 30 + ->setParameters($parameters); 31 + 32 + // This can fail for some types of datasources (like the custom field proxy 33 + // datasources) if the "parameters" are wrong. Just fail cleanly instead 34 + // of fataling. 35 + try { 36 + $application_class = $source->getDatasourceApplicationClass(); 37 + } catch (Exception $ex) { 38 + return new Aphront404Response(); 39 + } 40 + 25 41 if ($application_class) { 26 42 $result = id(new PhabricatorApplicationQuery()) 27 43 ->setViewer($this->getViewer())
+6
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
··· 226 226 if ($source->getAllDatasourceFunctions()) { 227 227 $reference_uri = '/typeahead/help/'.get_class($source).'/'; 228 228 229 + $parameters = $source->getParameters(); 230 + if ($parameters) { 231 + $reference_uri = (string)id(new PhutilURI($reference_uri)) 232 + ->setQueryParam('parameters', phutil_json_encode($parameters)); 233 + } 234 + 229 235 $reference_link = phutil_tag( 230 236 'a', 231 237 array(
+1 -1
src/infrastructure/customfield/datasource/PhabricatorCustomFieldApplicationSearchAnyFunctionDatasource.php
··· 22 22 'summary' => pht('Find results with any value.'), 23 23 'description' => pht( 24 24 "This function includes results which have any value. Use a query ". 25 - "like this to find results with any value:\n\n%s". 25 + "like this to find results with any value:\n\n%s", 26 26 '> any()'), 27 27 ), 28 28 );