2011-03-08 00:13:36 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
abstract class DiffusionController extends PhabricatorController {
|
|
|
|
|
2011-03-09 02:31:44 +01:00
|
|
|
protected $diffusionRequest;
|
|
|
|
|
|
|
|
public function willProcessRequest(array $data) {
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
if (isset($data['callsign'])) {
|
2012-11-09 00:14:44 +01:00
|
|
|
$drequest = DiffusionRequest::newFromAphrontRequestDictionary(
|
|
|
|
$data,
|
|
|
|
$this->getRequest());
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
$this->diffusionRequest = $drequest;
|
|
|
|
}
|
2011-03-09 02:31:44 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setDiffusionRequest(DiffusionRequest $request) {
|
|
|
|
$this->diffusionRequest = $request;
|
|
|
|
return $this;
|
|
|
|
}
|
|
|
|
|
2011-03-13 01:17:34 +01:00
|
|
|
protected function getDiffusionRequest() {
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
if (!$this->diffusionRequest) {
|
|
|
|
throw new Exception("No Diffusion request object!");
|
|
|
|
}
|
2011-03-13 01:17:34 +01:00
|
|
|
return $this->diffusionRequest;
|
|
|
|
}
|
|
|
|
|
|
|
|
final protected function buildSideNav($selected, $has_change_view) {
|
2012-12-07 22:30:31 +01:00
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
|
|
$nav->setBaseURI(new PhutilURI(''));
|
2011-03-13 01:17:34 +01:00
|
|
|
|
|
|
|
$navs = array(
|
2013-05-11 17:23:19 +02:00
|
|
|
'history' => pht('History View'),
|
|
|
|
'browse' => pht('Browse View'),
|
|
|
|
'change' => pht('Change View'),
|
2011-03-13 01:17:34 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
if (!$has_change_view) {
|
|
|
|
unset($navs['change']);
|
|
|
|
}
|
|
|
|
|
|
|
|
$drequest = $this->getDiffusionRequest();
|
2012-11-08 20:11:44 +01:00
|
|
|
$branch = $drequest->loadBranch();
|
|
|
|
|
|
|
|
if ($branch && $branch->getLintCommit()) {
|
2013-05-11 17:23:19 +02:00
|
|
|
$navs['lint'] = pht('Lint View');
|
2012-11-08 20:11:44 +01:00
|
|
|
}
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2012-12-07 22:30:31 +01:00
|
|
|
$selected_href = null;
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
foreach ($navs as $action => $name) {
|
|
|
|
$href = $drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'action' => $action,
|
|
|
|
));
|
2012-12-07 22:30:31 +01:00
|
|
|
if ($action == $selected) {
|
|
|
|
$selected_href = $href;
|
|
|
|
}
|
2011-03-13 01:17:34 +01:00
|
|
|
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$nav->addFilter($href, $name, $href);
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
2012-12-07 22:30:31 +01:00
|
|
|
$nav->selectFilter($selected_href, null);
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
|
|
|
|
// TODO: URI encoding might need to be sorted out for this link.
|
|
|
|
|
2012-12-07 22:30:31 +01:00
|
|
|
$nav->addFilter(
|
2013-01-24 03:00:22 +01:00
|
|
|
'',
|
2013-05-11 17:23:19 +02:00
|
|
|
pht("Search Owners \xE2\x86\x97"),
|
2012-12-07 22:30:31 +01:00
|
|
|
'/owners/view/search/'.
|
|
|
|
'?repository='.phutil_escape_uri($drequest->getCallsign()).
|
2013-01-24 03:00:22 +01:00
|
|
|
'&path='.phutil_escape_uri('/'.$drequest->getPath()));
|
2011-03-13 01:17:34 +01:00
|
|
|
|
|
|
|
return $nav;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function buildCrumbs(array $spec = array()) {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumbs = $this->buildApplicationCrumbs();
|
2011-03-31 07:08:41 +02:00
|
|
|
$crumb_list = $this->buildCrumbList($spec);
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
foreach ($crumb_list as $crumb) {
|
|
|
|
$crumbs->addCrumb($crumb);
|
|
|
|
}
|
2011-03-31 07:08:41 +02:00
|
|
|
return $crumbs;
|
|
|
|
}
|
|
|
|
|
|
|
|
private function buildCrumbList(array $spec = array()) {
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2012-04-19 18:39:19 +02:00
|
|
|
$spec = $spec + array(
|
|
|
|
'commit' => null,
|
|
|
|
'tags' => null,
|
2012-05-10 09:28:19 +02:00
|
|
|
'branches' => null,
|
2012-04-19 18:39:19 +02:00
|
|
|
'view' => null,
|
|
|
|
);
|
|
|
|
|
2011-03-13 01:17:34 +01:00
|
|
|
$crumb_list = array();
|
|
|
|
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
// On the home page, we don't have a DiffusionRequest.
|
|
|
|
if ($this->diffusionRequest) {
|
|
|
|
$drequest = $this->getDiffusionRequest();
|
|
|
|
$repository = $drequest->getRepository();
|
|
|
|
} else {
|
|
|
|
$drequest = null;
|
|
|
|
$repository = null;
|
|
|
|
}
|
|
|
|
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
if (!$repository) {
|
2011-03-31 07:08:41 +02:00
|
|
|
return $crumb_list;
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$callsign = $repository->getCallsign();
|
2012-12-13 03:40:18 +01:00
|
|
|
$repository_name = 'r'.$callsign;
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2012-05-10 09:28:19 +02:00
|
|
|
if (!$spec['commit'] && !$spec['tags'] && !$spec['branches']) {
|
2012-01-19 20:49:51 +01:00
|
|
|
$branch_name = $drequest->getBranch();
|
|
|
|
if ($branch_name) {
|
2012-12-13 03:40:18 +01:00
|
|
|
$repository_name .= ' ('.$branch_name.')';
|
2012-01-19 20:49:51 +01:00
|
|
|
}
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = id(new PhabricatorCrumbView())
|
|
|
|
->setName($repository_name);
|
|
|
|
if (!$spec['view'] && !$spec['commit'] &&
|
|
|
|
!$spec['tags'] && !$spec['branches']) {
|
|
|
|
$crumb_list[] = $crumb;
|
|
|
|
return $crumb_list;
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
2013-09-23 21:54:12 +02:00
|
|
|
$crumb->setHref(
|
|
|
|
$drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'action' => 'branch',
|
|
|
|
'path' => '/',
|
|
|
|
)));
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb_list[] = $crumb;
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2011-03-14 00:19:39 +01:00
|
|
|
$raw_commit = $drequest->getRawCommit();
|
2012-04-24 03:36:25 +02:00
|
|
|
|
|
|
|
if ($spec['tags']) {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = new PhabricatorCrumbView();
|
2012-04-24 03:36:25 +02:00
|
|
|
if ($spec['commit']) {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb->setName(
|
2013-05-11 17:23:19 +02:00
|
|
|
pht("Tags for %s", 'r'.$callsign.$raw_commit));
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb->setHref($drequest->generateURI(
|
2012-04-24 03:36:25 +02:00
|
|
|
array(
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
'action' => 'commit',
|
|
|
|
'commit' => $raw_commit,
|
2013-02-19 22:33:10 +01:00
|
|
|
)));
|
2012-04-24 03:36:25 +02:00
|
|
|
} else {
|
2013-05-11 17:23:19 +02:00
|
|
|
$crumb->setName(pht('Tags'));
|
2012-04-24 03:36:25 +02:00
|
|
|
}
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb_list[] = $crumb;
|
2011-03-31 07:08:41 +02:00
|
|
|
return $crumb_list;
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
2012-05-10 09:28:19 +02:00
|
|
|
if ($spec['branches']) {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = id(new PhabricatorCrumbView())
|
2013-05-11 17:23:19 +02:00
|
|
|
->setName(pht('Branches'));
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb_list[] = $crumb;
|
2012-05-10 09:28:19 +02:00
|
|
|
return $crumb_list;
|
|
|
|
}
|
|
|
|
|
2012-04-24 03:36:25 +02:00
|
|
|
if ($spec['commit']) {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = id(new PhabricatorCrumbView())
|
|
|
|
->setName("r{$callsign}{$raw_commit}")
|
|
|
|
->setHref("r{$callsign}{$raw_commit}");
|
|
|
|
$crumb_list[] = $crumb;
|
2012-04-19 18:39:19 +02:00
|
|
|
return $crumb_list;
|
|
|
|
}
|
|
|
|
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = new PhabricatorCrumbView();
|
2011-03-13 01:17:34 +01:00
|
|
|
$view = $spec['view'];
|
|
|
|
|
2011-03-31 02:36:16 +02:00
|
|
|
$path = null;
|
|
|
|
if (isset($spec['path'])) {
|
|
|
|
$path = $drequest->getPath();
|
|
|
|
}
|
|
|
|
|
|
|
|
if ($raw_commit) {
|
|
|
|
$commit_link = DiffusionView::linkCommit(
|
|
|
|
$repository,
|
|
|
|
$raw_commit);
|
|
|
|
} else {
|
|
|
|
$commit_link = '';
|
|
|
|
}
|
|
|
|
|
2011-03-13 01:17:34 +01:00
|
|
|
switch ($view) {
|
|
|
|
case 'history':
|
2013-05-11 17:23:19 +02:00
|
|
|
$view_name = pht('History');
|
2011-03-13 01:17:34 +01:00
|
|
|
break;
|
|
|
|
case 'browse':
|
2013-05-11 17:23:19 +02:00
|
|
|
$view_name = pht('Browse');
|
2011-03-13 01:17:34 +01:00
|
|
|
break;
|
2012-11-08 20:11:44 +01:00
|
|
|
case 'lint':
|
2013-05-11 17:23:19 +02:00
|
|
|
$view_name = pht('Lint');
|
2012-11-08 20:11:44 +01:00
|
|
|
break;
|
2011-03-14 06:03:30 +01:00
|
|
|
case 'change':
|
2013-05-11 17:23:19 +02:00
|
|
|
$view_name = pht('Change');
|
2013-09-23 21:54:12 +02:00
|
|
|
break;
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
$uri_params = array(
|
|
|
|
'action' => $view,
|
|
|
|
);
|
2011-03-13 01:17:34 +01:00
|
|
|
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb = id(new PhabricatorCrumbView())
|
|
|
|
->setName($view_name);
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2013-09-23 21:54:12 +02:00
|
|
|
if ($view == 'browse' || $view == 'change') {
|
upgrade diffusion to use modern header UI and fix a few quirks
Summary:
upgrades are CrumbsView, HeaderView, PropertyListView, and ActionListView. I had to modify CrumbsView stuff a bit to handle the "advanced" diffusion crumbs.
Quirks fixed include making file tree view show up in diffusion, the page not have extra space when the file tree is hidden, links no longer breaking once you visit files (since without the change the files always got "/" appended and thus 404'd), and a differential quirk where it read "next step:" and that colon is a no no,
Test Plan: played around in diffusion and differential
Reviewers: epriestley
Reviewed By: epriestley
CC: aran, Korvin, chad
Maniphest Tasks: T2048, T2178
Differential Revision: https://secure.phabricator.com/D4169
2012-12-13 02:50:42 +01:00
|
|
|
$crumb_list[] = $crumb;
|
2013-09-19 20:57:33 +02:00
|
|
|
return $crumb_list;
|
|
|
|
}
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2013-09-19 20:57:33 +02:00
|
|
|
$crumb->setHref($drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'path' => '',
|
|
|
|
) + $uri_params));
|
|
|
|
$crumb_list[] = $crumb;
|
2011-03-13 01:17:34 +01:00
|
|
|
|
2013-09-19 20:57:33 +02:00
|
|
|
$path_parts = explode('/', $path);
|
|
|
|
do {
|
|
|
|
$last = array_pop($path_parts);
|
|
|
|
} while (count($path_parts) && $last == '');
|
|
|
|
|
|
|
|
$path_sections = array();
|
|
|
|
$thus_far = '';
|
|
|
|
foreach ($path_parts as $path_part) {
|
|
|
|
$thus_far .= $path_part.'/';
|
|
|
|
$path_sections[] = '/';
|
|
|
|
$path_sections[] = phutil_tag(
|
|
|
|
'a',
|
|
|
|
array(
|
|
|
|
'href' => $drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'path' => $thus_far,
|
|
|
|
) + $uri_params),
|
|
|
|
),
|
|
|
|
$path_part);
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
2013-09-19 20:57:33 +02:00
|
|
|
$path_sections[] = '/'.$last;
|
|
|
|
|
|
|
|
$crumb_list[] = id(new PhabricatorCrumbView())
|
|
|
|
->setName($path_sections);
|
|
|
|
|
2011-03-13 01:17:34 +01:00
|
|
|
$last_crumb = array_pop($crumb_list);
|
|
|
|
|
|
|
|
if ($raw_commit) {
|
2013-01-18 03:57:09 +01:00
|
|
|
$jump_link = phutil_tag(
|
2011-03-13 01:17:34 +01:00
|
|
|
'a',
|
|
|
|
array(
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
'href' => $drequest->generateURI(
|
|
|
|
array(
|
2012-04-04 03:05:14 +02:00
|
|
|
'commit' => '',
|
Fix many encoding and architecture problems in Diffusion request and URI handling
Summary:
Diffusion request/uri handling is currently a big, hastily ported mess. In particular, it has:
- Tons and tons of duplicated code.
- Bugs with handling unusual branch and file names.
- An excessively large (and yet insufficiently expressive) API on DiffusionRequest, including a nonsensical concrete base class.
- Other tools were doing hacky things like passing ":" branch names.
This diff attempts to fix these issues.
- Make the base class abstract (it was concrete ONLY for "/diffusion/").
- Move all URI generation to DiffusionRequest. Make the core static. Add unit tests.
- Delete the 300 copies of URI generation code throughout Diffusion.
- Move all URI parsing to DiffusionRequest. Make the core static. Add unit tests.
- Add an appropriate static initializer for other callers.
- Convert all code calling `newFromAphrontRequestDictionary` outside of Diffusion to the new `newFromDictionary` API.
- Refactor static initializers to be sensibly-sized.
- Refactor derived DiffusionRequest classes to remove duplicated code.
- Properly encode branch names (fixes branches with "/", see <https://github.com/facebook/phabricator/issues/100>).
- Properly encode path names (fixes issues in D1742).
- Properly escape delimiter characters ";" and "$" in path names so files like "$100" are not interpreted as "line 100".
- Fix a couple warnings.
- Fix a couple lint issues.
- Fix a bug where we would not parse filenames with spaces in them correctly in the Git browse query.
- Fix a bug where Git change queries would fail unnecessarily.
- Provide or improve some documentation.
This thing is pretty gigantic but also kind of hard to split up. If it's unreasonably difficult to review, let me know and I can take a stab at it though.
This supplants D1742.
Test Plan:
- Used home, repository, branch, browse, change, history, diff (ajax), lastmodified (ajax) views of Diffusion.
- Used Owners typeaheads and search.
- Used diffusion.getrecentcommitsbypath method.
- Pushed a change to an absurdly-named file on an absurdly-named branch, everything worked properly.
{F9185}
Reviewers: nh, vrana, btrahan
Reviewed By: btrahan
CC: aran, epriestley
Differential Revision: https://secure.phabricator.com/D1921
2012-03-20 03:52:14 +01:00
|
|
|
) + $uri_params),
|
2011-03-13 01:17:34 +01:00
|
|
|
),
|
2013-05-11 17:23:19 +02:00
|
|
|
pht('Jump to HEAD'));
|
2013-01-26 02:07:07 +01:00
|
|
|
|
|
|
|
$name = $last_crumb->getName();
|
2013-02-06 00:14:18 +01:00
|
|
|
$name = hsprintf('%s @ %s (%s)', $name, $commit_link, $jump_link);
|
2013-01-26 02:07:07 +01:00
|
|
|
$last_crumb->setName($name);
|
2012-11-08 20:11:44 +01:00
|
|
|
} else if ($spec['view'] != 'lint') {
|
2013-01-26 02:07:07 +01:00
|
|
|
$name = $last_crumb->getName();
|
2013-02-06 00:14:18 +01:00
|
|
|
$name = hsprintf('%s @ HEAD', $name);
|
2013-01-26 02:07:07 +01:00
|
|
|
$last_crumb->setName($name);
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
$crumb_list[] = $last_crumb;
|
|
|
|
|
2011-03-31 07:08:41 +02:00
|
|
|
return $crumb_list;
|
2011-03-13 01:17:34 +01:00
|
|
|
}
|
|
|
|
|
2013-05-01 23:44:28 +02:00
|
|
|
protected function callConduitWithDiffusionRequest(
|
|
|
|
$method,
|
|
|
|
array $params = array()) {
|
|
|
|
|
|
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$drequest = $this->getDiffusionRequest();
|
|
|
|
|
|
|
|
return DiffusionQuery::callConduitWithDiffusionRequest(
|
|
|
|
$user,
|
|
|
|
$drequest,
|
|
|
|
$method,
|
|
|
|
$params);
|
|
|
|
}
|
2013-05-24 21:37:42 +02:00
|
|
|
|
|
|
|
protected function getRepositoryControllerURI(
|
|
|
|
PhabricatorRepository $repository,
|
|
|
|
$path) {
|
|
|
|
return $this->getApplicationURI($repository->getCallsign().'/'.$path);
|
|
|
|
}
|
|
|
|
|
2013-09-20 01:01:04 +02:00
|
|
|
protected function renderPathLinks(DiffusionRequest $drequest) {
|
|
|
|
$path = $drequest->getPath();
|
|
|
|
$path_parts = array_filter(explode('/', trim($path, '/')));
|
|
|
|
|
|
|
|
$links = array();
|
|
|
|
if ($path_parts) {
|
|
|
|
$links[] = phutil_tag(
|
|
|
|
'a',
|
|
|
|
array(
|
|
|
|
'href' => $drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'action' => 'browse',
|
|
|
|
'path' => '',
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
'r'.$drequest->getRepository()->getCallsign().'/');
|
|
|
|
$accum = '';
|
|
|
|
$last_key = last_key($path_parts);
|
|
|
|
foreach ($path_parts as $key => $part) {
|
|
|
|
$links[] = ' ';
|
|
|
|
$accum .= '/'.$part;
|
|
|
|
if ($key === $last_key) {
|
|
|
|
$links[] = $part;
|
|
|
|
} else {
|
|
|
|
$links[] = phutil_tag(
|
|
|
|
'a',
|
|
|
|
array(
|
|
|
|
'href' => $drequest->generateURI(
|
|
|
|
array(
|
|
|
|
'action' => 'browse',
|
|
|
|
'path' => $accum,
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
$part.'/');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$links[] = 'r'.$drequest->getRepository()->getCallsign().'/';
|
|
|
|
}
|
|
|
|
|
|
|
|
return $links;
|
|
|
|
}
|
|
|
|
|
2011-03-08 00:13:36 +01:00
|
|
|
}
|
2013-09-20 01:01:04 +02:00
|
|
|
|