@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix history link in Diffusion non-root browse views

Summary:
Fixes T9798. That task has good repro instructions.

In sub-views, we don't link the "History" icon correctly -- we only link it to `history/README` instead of `history/path/to/README`. Add the full path.

Also canonicalize the paths in a slightly prettier and more consistenty way.

Test Plan: Viewed root and non-root browse tables, saw links show up properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9798

Differential Revision: https://secure.phabricator.com/D14491

+12 -5
+12 -5
src/applications/diffusion/view/DiffusionBrowseTableView.php
··· 30 30 $rows = array(); 31 31 $show_edit = false; 32 32 foreach ($this->paths as $path) { 33 - 34 - $history_link = $this->linkHistory($path->getPath()); 33 + $full_path = $base_path.$path->getPath(); 35 34 36 35 $dir_slash = null; 37 36 $file_type = $path->getFileType(); ··· 40 39 $dir_slash = '/'; 41 40 42 41 $browse_link = phutil_tag('strong', array(), $this->linkBrowse( 43 - $base_path.$path->getPath().$dir_slash, 42 + $full_path.$dir_slash, 44 43 array( 45 44 'type' => $file_type, 46 45 'name' => $browse_text, 47 46 ))); 47 + 48 + $history_path = $full_path.'/'; 48 49 } else if ($file_type == DifferentialChangeType::FILE_SUBMODULE) { 49 50 $browse_text = $path->getPath().'/'; 50 51 $browse_link = phutil_tag('strong', array(), $this->linkBrowse( ··· 55 56 'hash' => $path->getHash(), 56 57 'external' => $path->getExternalURI(), 57 58 ))); 59 + 60 + $history_path = $full_path.'/'; 58 61 } else { 59 62 $browse_text = $path->getPath(); 60 63 $browse_link = $this->linkBrowse( 61 - $base_path.$path->getPath(), 64 + $full_path, 62 65 array( 63 66 'type' => $file_type, 64 67 'name' => $browse_text, 65 68 )); 69 + 70 + $history_path = $full_path; 66 71 } 67 72 73 + $history_link = $this->linkHistory($history_path); 74 + 68 75 $dict = array( 69 76 'lint' => celerity_generate_unique_node_id(), 70 77 'commit' => celerity_generate_unique_node_id(), ··· 73 80 'details' => celerity_generate_unique_node_id(), 74 81 ); 75 82 76 - $need_pull[$base_path.$path->getPath().$dir_slash] = $dict; 83 + $need_pull[$full_path.$dir_slash] = $dict; 77 84 foreach ($dict as $k => $uniq) { 78 85 $dict[$k] = phutil_tag('span', array('id' => $uniq), ''); 79 86 }