Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2689831
D25102.1734741430.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
1 KB
Referenced Files
None
Subscribers
None
D25102.1734741430.diff
View Options
diff --git a/src/applications/phriction/typeahead/PhrictionDocumentDatasource.php b/src/applications/phriction/typeahead/PhrictionDocumentDatasource.php
--- a/src/applications/phriction/typeahead/PhrictionDocumentDatasource.php
+++ b/src/applications/phriction/typeahead/PhrictionDocumentDatasource.php
@@ -18,6 +18,9 @@
public function loadResults() {
$viewer = $this->getViewer();
+ $app_type = pht('Wiki Document');
+ $mid_dot = "\xC2\xB7";
+
$query = id(new PhrictionDocumentQuery())
->setViewer($viewer)
->needContent(true);
@@ -34,15 +37,25 @@
foreach ($documents as $document) {
$content = $document->getContent();
- if (!$document->isActive()) {
- $closed = $document->getStatusDisplayName();
- } else {
+ if ($document->isActive()) {
$closed = null;
+ } else {
+ $closed = $document->getStatusDisplayName();
}
$slug = $document->getSlug();
$title = $content->getTitle();
+ // For some time the search result was
+ // just mentioning the document slug.
+ // Now, it also mentions the application type.
+ // Example: "Wiki Document - /foo/bar"
+ $display_type = sprintf(
+ '%s %s %s',
+ $app_type,
+ $mid_dot,
+ $slug);
+
$sprite = 'phabricator-search-icon phui-font-fa phui-icon-view fa-book';
$autocomplete = '[[ '.$slug.' ]]';
@@ -51,7 +64,7 @@
->setDisplayName($title)
->setURI($document->getURI())
->setPHID($document->getPHID())
- ->setDisplayType($slug)
+ ->setDisplayType($display_type)
->setPriorityType('wiki')
->setImageSprite($sprite)
->setAutocomplete($autocomplete)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 00:37 (17 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1021317
Default Alt Text
D25102.1734741430.diff (1 KB)
Attached To
Mode
D25102: Phriction: clarify its search results as "Wiki page"
Attached
Detach File
Event Timeline
Log In to Comment