Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2695351
D25812.1734836607.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
D25812.1734836607.diff
View Options
diff --git a/src/applications/diviner/storage/DivinerLiveSymbol.php b/src/applications/diviner/storage/DivinerLiveSymbol.php
--- a/src/applications/diviner/storage/DivinerLiveSymbol.php
+++ b/src/applications/diviner/storage/DivinerLiveSymbol.php
@@ -124,20 +124,35 @@
$parts = array(
'book',
$this->getBook()->getName(),
- $this->getType(),
);
- if ($this->getContext()) {
- $parts[] = $this->getContext();
- }
-
- $parts[] = $this->getName();
-
- if ($this->getAtomIndex()) {
- $parts[] = $this->getAtomIndex();
+ // Method URIs need to be the class and the corresponding anchor
+ if ($this->getType() == 'method') {
+ $parts[] = phutil_escape_uri_path_component(DivinerAtom::TYPE_CLASS);
+
+ $atom_data = id(new DivinerLiveAtom())->loadAllWhere(
+ 'symbolPHID IN (%Ls)',
+ mpull(array($this), 'getPHID'));
+ foreach ($atom_data as $atom) {
+ $atom = DivinerAtom::newFromDictionary($atom->getAtomData());
+ $method_class_name = basename($atom->getFile(), '.php');
+ $parts[] = phutil_escape_uri_path_component($method_class_name);
+ }
+ $parts[] = '#method';
+ $parts[] = phutil_escape_uri_path_component($this->getName());
+ return '/'.implode('/', $parts);
+ } else {
+ $parts[] = $this->getType();
+ if ($this->getContext()) {
+ $parts[] = $this->getContext();
+ }
+
+ $parts[] = $this->getName();
+ if ($this->getAtomIndex()) {
+ $parts[] = $this->getAtomIndex();
+ }
+ return '/'.implode('/', $parts).'/';
}
-
- return '/'.implode('/', $parts).'/';
}
public function getSortKey() {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 22, 03:03 (16 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1025259
Default Alt Text
D25812.1734836607.diff (1 KB)
Attached To
Mode
D25812: Fix method search result URIs in Diviner
Attached
Detach File
Event Timeline
Log In to Comment