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

Support Phame document types for Current Application global search scope

Summary:
`PhabricatorMainMenuSearchView::getGlobalSearchScopeItems()` checks `if ($application->getApplicationSearchDocumentTypes())` and later sets `'value' => $application_value` (if existing) to only search for document types supported by the Current Application.
This works for most applications (e.g. setting Maniphest as the Current Application and Tasks as Document Type when being on http://phorge.localhost/maniphest/).
It does not work for Phame when being on http://phorge.localhost/phame/ - global search results are not restricted to Phame when selecting "Current Application".

Fix that by adding the missing function `PhabricatorPhameApplication::getApplicationSearchDocumentTypes()`.

Closes T16163

Test Plan:
* Go to http://phorge.localhost/phame/
* In the upper right corner, select the search scope dropdown and see the default application icon in front of "Current Application"
* Before this patch "Current Application" has a generic icon; after this patch "Current Application" has the Phame icon
* Select "Current Application", enter a search term, press Enter key
* On the results page, before this patch the "Document Types" field is empty and results come from any applications; after this patch the "Document Types" field is set to "Phame Blog" and "Phame Post" and results only come from the Phame application which was/is our Current Application per the URI where we started

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16163

Differential Revision: https://we.phorge.it/D26171

+7
+7
src/applications/phame/application/PhabricatorPhameApplication.php
··· 113 113 ); 114 114 } 115 115 116 + public function getApplicationSearchDocumentTypes() { 117 + return array( 118 + PhabricatorPhameBlogPHIDType::TYPECONST, 119 + PhabricatorPhamePostPHIDType::TYPECONST, 120 + ); 121 + } 122 + 116 123 }