Page MenuHomePhorge

D25812.1729340863.diff
No OneTemporary

D25812.1729340863.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
Sat, Oct 19, 12:27 (20 h, 4 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
932820
Default Alt Text
D25812.1729340863.diff (1 KB)

Event Timeline