Page MenuHomePhorge

D25812.1734836607.diff
No OneTemporary

D25812.1734836607.diff

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

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)

Event Timeline