Remove repository shortcuts
Summary: Repositories currently have a no-UI "shortcut" feature which is only used by Facebook (and I'm not sure it's even used). As implemented, this feature is policy-oblivious and kind of nonsensical. Throw it away. I'm open to reimplementing this, but I want to see some level of interest in it before I do. The new implementation would add shortcuts to each repository, similar to how mirrors work. My original plan was to follow this up with such an implementation (it's half-implemented in my sandbox), but as I worked through it I'm not sure it's really valuable. Test Plan: Browsed repository list, grep. Reviewers: btrahan Reviewed By: btrahan CC: FacebookPOC, aran Differential Revision: https://secure.phabricator.com/D7862
This commit is contained in:
@@ -17,7 +17,6 @@ final class DiffusionRepositoryListController extends DiffusionController
|
||||
$request = $this->getRequest();
|
||||
$controller = id(new PhabricatorApplicationSearchController($request))
|
||||
->setQueryKey($this->queryKey)
|
||||
->setPreface($this->buildShortcuts())
|
||||
->setSearchEngine(new PhabricatorRepositorySearchEngine())
|
||||
->setNavigation($this->buildSideNavView());
|
||||
|
||||
@@ -115,33 +114,4 @@ final class DiffusionRepositoryListController extends DiffusionController
|
||||
return $crumbs;
|
||||
}
|
||||
|
||||
private function buildShortcuts() {
|
||||
$shortcuts = id(new PhabricatorRepositoryShortcut())->loadAll();
|
||||
if ($shortcuts) {
|
||||
$shortcuts = msort($shortcuts, 'getSequence');
|
||||
|
||||
$rows = array();
|
||||
foreach ($shortcuts as $shortcut) {
|
||||
$rows[] = array(
|
||||
$shortcut->getName(),
|
||||
$shortcut->getHref(),
|
||||
$shortcut->getDescription(),
|
||||
);
|
||||
}
|
||||
|
||||
$list = new PHUIObjectItemListView();
|
||||
foreach ($rows as $row) {
|
||||
$item = id(new PHUIObjectItemView())
|
||||
->setHeader($row[0])
|
||||
->setHref($row[1])
|
||||
->setSubhead(($row[2] ? $row[2] : pht('No Description')));
|
||||
$list->addItem($item);
|
||||
}
|
||||
$shortcut_panel = array($list, phutil_tag('hr'));
|
||||
} else {
|
||||
$shortcut_panel = null;
|
||||
}
|
||||
return $shortcut_panel;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user