From c4bcfc85f1603fff1cfd1c06217aac27ed7da114 Mon Sep 17 00:00:00 2001 From: Joshua Spence Date: Mon, 1 Jun 2015 15:37:13 +1000 Subject: [PATCH] Remove the repositories application Summary: Fixes T7603. This application is no longer used. Test Plan: Went to `/repository/` and got a 404. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley Maniphest Tasks: T7603 Differential Revision: https://secure.phabricator.com/D12734 --- src/__phutil_library_map__.php | 6 -- .../PhabricatorRepositoriesApplication.php | 37 ------- .../PhabricatorRepositoryController.php | 15 --- .../PhabricatorRepositoryListController.php | 101 ------------------ 4 files changed, 159 deletions(-) delete mode 100644 src/applications/repository/application/PhabricatorRepositoriesApplication.php delete mode 100644 src/applications/repository/controller/PhabricatorRepositoryController.php delete mode 100644 src/applications/repository/controller/PhabricatorRepositoryListController.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index ec19e884e9..a79ccf1313 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -2388,7 +2388,6 @@ phutil_register_library_map(array( 'PhabricatorRemarkupFigletBlockInterpreter' => 'infrastructure/markup/interpreter/PhabricatorRemarkupFigletBlockInterpreter.php', 'PhabricatorRemarkupGraphvizBlockInterpreter' => 'infrastructure/markup/interpreter/PhabricatorRemarkupGraphvizBlockInterpreter.php', 'PhabricatorRemarkupUIExample' => 'applications/uiexample/examples/PhabricatorRemarkupUIExample.php', - 'PhabricatorRepositoriesApplication' => 'applications/repository/application/PhabricatorRepositoriesApplication.php', 'PhabricatorRepositoriesSetupCheck' => 'applications/config/check/PhabricatorRepositoriesSetupCheck.php', 'PhabricatorRepository' => 'applications/repository/storage/PhabricatorRepository.php', 'PhabricatorRepositoryArcanistProject' => 'applications/repository/storage/PhabricatorRepositoryArcanistProject.php', @@ -2407,7 +2406,6 @@ phutil_register_library_map(array( 'PhabricatorRepositoryCommitRef' => 'applications/repository/engine/PhabricatorRepositoryCommitRef.php', 'PhabricatorRepositoryCommitSearchIndexer' => 'applications/repository/search/PhabricatorRepositoryCommitSearchIndexer.php', 'PhabricatorRepositoryConfigOptions' => 'applications/repository/config/PhabricatorRepositoryConfigOptions.php', - 'PhabricatorRepositoryController' => 'applications/repository/controller/PhabricatorRepositoryController.php', 'PhabricatorRepositoryDAO' => 'applications/repository/storage/PhabricatorRepositoryDAO.php', 'PhabricatorRepositoryDiscoveryEngine' => 'applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php', 'PhabricatorRepositoryEditor' => 'applications/repository/editor/PhabricatorRepositoryEditor.php', @@ -2416,7 +2414,6 @@ phutil_register_library_map(array( 'PhabricatorRepositoryGitCommitMessageParserWorker' => 'applications/repository/worker/commitmessageparser/PhabricatorRepositoryGitCommitMessageParserWorker.php', 'PhabricatorRepositoryGraphCache' => 'applications/repository/graphcache/PhabricatorRepositoryGraphCache.php', 'PhabricatorRepositoryGraphStream' => 'applications/repository/daemon/PhabricatorRepositoryGraphStream.php', - 'PhabricatorRepositoryListController' => 'applications/repository/controller/PhabricatorRepositoryListController.php', 'PhabricatorRepositoryManagementCacheWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementCacheWorkflow.php', 'PhabricatorRepositoryManagementDiscoverWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php', 'PhabricatorRepositoryManagementEditWorkflow' => 'applications/repository/management/PhabricatorRepositoryManagementEditWorkflow.php', @@ -5824,7 +5821,6 @@ phutil_register_library_map(array( 'PhabricatorRemarkupFigletBlockInterpreter' => 'PhutilRemarkupBlockInterpreter', 'PhabricatorRemarkupGraphvizBlockInterpreter' => 'PhutilRemarkupBlockInterpreter', 'PhabricatorRemarkupUIExample' => 'PhabricatorUIExample', - 'PhabricatorRepositoriesApplication' => 'PhabricatorApplication', 'PhabricatorRepositoriesSetupCheck' => 'PhabricatorSetupCheck', 'PhabricatorRepository' => array( 'PhabricatorRepositoryDAO', @@ -5868,14 +5864,12 @@ phutil_register_library_map(array( 'PhabricatorRepositoryCommitParserWorker' => 'PhabricatorWorker', 'PhabricatorRepositoryCommitSearchIndexer' => 'PhabricatorSearchDocumentIndexer', 'PhabricatorRepositoryConfigOptions' => 'PhabricatorApplicationConfigOptions', - 'PhabricatorRepositoryController' => 'PhabricatorController', 'PhabricatorRepositoryDAO' => 'PhabricatorLiskDAO', 'PhabricatorRepositoryDiscoveryEngine' => 'PhabricatorRepositoryEngine', 'PhabricatorRepositoryEditor' => 'PhabricatorApplicationTransactionEditor', 'PhabricatorRepositoryGitCommitChangeParserWorker' => 'PhabricatorRepositoryCommitChangeParserWorker', 'PhabricatorRepositoryGitCommitMessageParserWorker' => 'PhabricatorRepositoryCommitMessageParserWorker', 'PhabricatorRepositoryGraphStream' => 'Phobject', - 'PhabricatorRepositoryListController' => 'PhabricatorRepositoryController', 'PhabricatorRepositoryManagementCacheWorkflow' => 'PhabricatorRepositoryManagementWorkflow', 'PhabricatorRepositoryManagementDiscoverWorkflow' => 'PhabricatorRepositoryManagementWorkflow', 'PhabricatorRepositoryManagementEditWorkflow' => 'PhabricatorRepositoryManagementWorkflow', diff --git a/src/applications/repository/application/PhabricatorRepositoriesApplication.php b/src/applications/repository/application/PhabricatorRepositoriesApplication.php deleted file mode 100644 index f740d05dcd..0000000000 --- a/src/applications/repository/application/PhabricatorRepositoriesApplication.php +++ /dev/null @@ -1,37 +0,0 @@ - array( - '' => 'PhabricatorRepositoryListController', - ), - ); - } - -} diff --git a/src/applications/repository/controller/PhabricatorRepositoryController.php b/src/applications/repository/controller/PhabricatorRepositoryController.php deleted file mode 100644 index 9f1192520d..0000000000 --- a/src/applications/repository/controller/PhabricatorRepositoryController.php +++ /dev/null @@ -1,15 +0,0 @@ -getRequest(); - $user = $request->getUser(); - $is_admin = $user->getIsAdmin(); - - $repos = id(new PhabricatorRepositoryQuery()) - ->setViewer($user) - ->execute(); - $repos = msort($repos, 'getName'); - - $rows = array(); - foreach ($repos as $repo) { - - if ($repo->isTracked()) { - $diffusion_link = phutil_tag( - 'a', - array( - 'href' => '/diffusion/'.$repo->getCallsign().'/', - ), - pht('View in Diffusion')); - } else { - $diffusion_link = phutil_tag('em', array(), pht('Not Tracked')); - } - - $rows[] = array( - $repo->getCallsign(), - $repo->getName(), - PhabricatorRepositoryType::getNameForRepositoryType( - $repo->getVersionControlSystem()), - $diffusion_link, - phutil_tag( - 'a', - array( - 'class' => 'button small grey', - 'href' => '/diffusion/'.$repo->getCallsign().'/edit/', - ), - pht('Edit')), - ); - } - - $table = new AphrontTableView($rows); - $table->setNoDataString(pht('No Repositories')); - $table->setHeaders( - array( - pht('Callsign'), - pht('Repository'), - pht('Type'), - pht('Diffusion'), - '', - )); - $table->setColumnClasses( - array( - null, - 'wide', - null, - null, - 'action', - )); - - $table->setColumnVisibility( - array( - true, - true, - true, - true, - $is_admin, - )); - - $panel = new PHUIObjectBoxView(); - $header = new PHUIHeaderView(); - $header->setHeader(pht('Repositories')); - if ($is_admin) { - $button = id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Create New Repository')) - ->setHref('/diffusion/new/'); - $header->addActionLink($button); - } - $panel->setHeader($header); - $panel->appendChild($table); - - $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb(pht('Repository List')); - - return $this->buildApplicationPage( - array( - $crumbs, - $panel, - ), - array( - 'title' => pht('Repository List'), - )); - } - -}