diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index b4f3aff738..0d159e0586 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -763,7 +763,6 @@ phutil_register_library_map(array( 'DiffusionRepositoryListController' => 'applications/diffusion/controller/DiffusionRepositoryListController.php', 'DiffusionRepositoryManageController' => 'applications/diffusion/controller/DiffusionRepositoryManageController.php', 'DiffusionRepositoryManagementPanel' => 'applications/diffusion/management/DiffusionRepositoryManagementPanel.php', - 'DiffusionRepositoryNewController' => 'applications/diffusion/controller/DiffusionRepositoryNewController.php', 'DiffusionRepositoryPath' => 'applications/diffusion/data/DiffusionRepositoryPath.php', 'DiffusionRepositoryPoliciesManagementPanel' => 'applications/diffusion/management/DiffusionRepositoryPoliciesManagementPanel.php', 'DiffusionRepositoryRef' => 'applications/diffusion/data/DiffusionRepositoryRef.php', @@ -4979,7 +4978,6 @@ phutil_register_library_map(array( 'DiffusionRepositoryListController' => 'DiffusionController', 'DiffusionRepositoryManageController' => 'DiffusionController', 'DiffusionRepositoryManagementPanel' => 'Phobject', - 'DiffusionRepositoryNewController' => 'DiffusionController', 'DiffusionRepositoryPath' => 'Phobject', 'DiffusionRepositoryPoliciesManagementPanel' => 'DiffusionRepositoryManagementPanel', 'DiffusionRepositoryRef' => 'Phobject', diff --git a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php index c644365556..176ee81872 100644 --- a/src/applications/diffusion/application/PhabricatorDiffusionApplication.php +++ b/src/applications/diffusion/application/PhabricatorDiffusionApplication.php @@ -59,9 +59,6 @@ final class PhabricatorDiffusionApplication extends PhabricatorApplication { => 'DiffusionRepositoryListController', $this->getEditRoutePattern('edit/') => 'DiffusionRepositoryEditproController', - 'new/' => 'DiffusionRepositoryNewController', - '(?Pcreate)/' => 'DiffusionRepositoryCreateController', - '(?Pimport)/' => 'DiffusionRepositoryCreateController', 'pushlog/' => array( '(?:query/(?P[^/]+)/)?' => 'DiffusionPushLogListController', 'view/(?P\d+)/' => 'DiffusionPushEventViewController', diff --git a/src/applications/diffusion/controller/DiffusionRepositoryNewController.php b/src/applications/diffusion/controller/DiffusionRepositoryNewController.php deleted file mode 100644 index 560d896aff..0000000000 --- a/src/applications/diffusion/controller/DiffusionRepositoryNewController.php +++ /dev/null @@ -1,79 +0,0 @@ -getViewer(); - - $this->requireApplicationCapability( - DiffusionCreateRepositoriesCapability::CAPABILITY); - - if ($request->isFormPost()) { - if ($request->getStr('type')) { - switch ($request->getStr('type')) { - case 'create': - $uri = $this->getApplicationURI('create/'); - break; - case 'import': - default: - $uri = $this->getApplicationURI('import/'); - break; - } - - return id(new AphrontRedirectResponse())->setURI($uri); - } - } - - $doc_href = PhabricatorEnv::getDoclink( - 'Diffusion User Guide: Repository Hosting'); - - $doc_link = phutil_tag( - 'a', - array( - 'href' => $doc_href, - 'target' => '_blank', - ), - pht('Diffusion User Guide: Repository Hosting')); - - $form = id(new AphrontFormView()) - ->setUser($viewer) - ->appendChild( - id(new AphrontFormRadioButtonControl()) - ->setName('type') - ->addButton( - 'create', - pht('Create a New Hosted Repository'), - array( - pht( - 'Create a new, empty repository which Phabricator will host. '. - 'For instructions on configuring repository hosting, see %s.', - $doc_link), - )) - ->addButton( - 'import', - pht('Import an Existing External Repository'), - pht( - "Import a repository hosted somewhere else, like GitHub, ". - "Bitbucket, or your organization's existing servers. ". - "Phabricator will read changes from the repository but will ". - "not host or manage it. The authoritative master version of ". - "the repository will stay where it is now."))) - ->appendChild( - id(new AphrontFormSubmitControl()) - ->setValue(pht('Continue')) - ->addCancelButton($this->getApplicationURI())); - - $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb(pht('New Repository')); - - $form_box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Create or Import Repository')) - ->setForm($form); - - return $this->newPage() - ->setTitle(pht('New Repository')) - ->setCrumbs($crumbs) - ->appendChild($form_box); - } - -} diff --git a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php index 059ae9a76d..18519f56be 100644 --- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php @@ -242,16 +242,10 @@ final class PhabricatorRepositorySearchEngine protected function getNewUserBody() { - $import_button = id(new PHUIButtonView()) + $new_button = id(new PHUIButtonView()) ->setTag('a') - ->setText(pht('Import Repository')) - ->setHref('/diffusion/import/') - ->setColor(PHUIButtonView::GREEN); - - $create_button = id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Create Repository')) - ->setHref('/diffusion/create/') + ->setText(pht('New Repository')) + ->setHref('/diffusion/edit/') ->setColor(PHUIButtonView::GREEN); $icon = $this->getApplication()->getIcon(); @@ -261,8 +255,7 @@ final class PhabricatorRepositorySearchEngine ->setTitle(pht('Welcome to %s', $app_name)) ->setDescription( pht('Import, create, or just browse repositories in Diffusion.')) - ->addAction($import_button) - ->addAction($create_button); + ->addAction($new_button); return $view; }