Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14383576
D12710.id30524.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12710.id30524.diff
View Options
diff --git a/src/applications/search/view/PhabricatorSearchResultView.php b/src/applications/search/view/PhabricatorSearchResultView.php
--- a/src/applications/search/view/PhabricatorSearchResultView.php
+++ b/src/applications/search/view/PhabricatorSearchResultView.php
@@ -31,12 +31,12 @@
$type_name = nonempty($handle->getTypeName(), pht('Document'));
- $title = $this->emboldenQuery($handle->getFullName());
- if ($handle->getStatus() == PhabricatorObjectHandleStatus::STATUS_CLOSED) {
- }
+ $raw_title = $handle->getFullName();
+ $title = $this->emboldenQuery($raw_title);
$item = id(new PHUIObjectItemView())
->setHeader($title)
+ ->setTitleText($raw_title)
->setHref($handle->getURI())
->setImageURI($handle->getImageURI())
->addAttribute($type_name);
@@ -110,6 +110,9 @@
$buf = '';
$pos = 0;
$is_bold = false;
+
+ // Make sure this is UTF8 because phutil_utf8v() will explode if it isn't.
+ $str = phutil_utf8ize($str);
foreach (phutil_utf8v($str) as $chr) {
if ($bold[$pos] != $is_bold) {
if (strlen($buf)) {
diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php
--- a/src/view/phui/PHUIObjectItemView.php
+++ b/src/view/phui/PHUIObjectItemView.php
@@ -22,6 +22,7 @@
private $state;
private $fontIcon;
private $imageIcon;
+ private $titleText;
const AGE_FRESH = 'fresh';
const AGE_STALE = 'stale';
@@ -98,6 +99,15 @@
return $this;
}
+ public function setTitleText($title_text) {
+ $this->titleText = $title_text;
+ return $this;
+ }
+
+ public function getTitleText() {
+ return $this->titleText;
+ }
+
public function getHeader() {
return $this->header;
}
@@ -329,12 +339,19 @@
);
}
+ $title_text = null;
+ if ($this->titleText) {
+ $title_text = $this->titleText;
+ } else if ($this->href) {
+ $title_text = $this->header;
+ }
+
$header_link = phutil_tag(
$this->href ? 'a' : 'div',
array(
'href' => $this->href,
'class' => 'phui-object-item-link',
- 'title' => ($this->href) ? $this->header : null,
+ 'title' => $title_text,
),
$this->header);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 7:10 AM (21 h, 4 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6917356
Default Alt Text
D12710.id30524.diff (2 KB)
Attached To
Mode
D12710: Fix two global search issues
Attached
Detach File
Event Timeline
Log In to Comment