1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Drop "-pro" suffix and "editpro" URIs for EditEngine in Maniphest

Summary: Ref T9908. Move all the "pro" stuff into the old locations.

Test Plan: Created/edited tasks, looked at URIs, saw non-pro ones. Grepped for `editpro`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9908

Differential Revision: https://secure.phabricator.com/D14717
This commit is contained in:
epriestley 2015-12-08 16:54:46 -08:00
parent bce83bf844
commit b3fbf883e0
9 changed files with 13 additions and 18 deletions

View file

@ -1303,7 +1303,7 @@ phutil_register_library_map(array(
'ManiphestTaskDescriptionHeraldField' => 'applications/maniphest/herald/ManiphestTaskDescriptionHeraldField.php',
'ManiphestTaskDetailController' => 'applications/maniphest/controller/ManiphestTaskDetailController.php',
'ManiphestTaskEditBulkJobType' => 'applications/maniphest/bulk/ManiphestTaskEditBulkJobType.php',
'ManiphestTaskEditProController' => 'applications/maniphest/controller/ManiphestTaskEditProController.php',
'ManiphestTaskEditController' => 'applications/maniphest/controller/ManiphestTaskEditController.php',
'ManiphestTaskHasCommitEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasCommitEdgeType.php',
'ManiphestTaskHasMockEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasMockEdgeType.php',
'ManiphestTaskHasRevisionEdgeType' => 'applications/maniphest/edge/ManiphestTaskHasRevisionEdgeType.php',
@ -5303,7 +5303,7 @@ phutil_register_library_map(array(
'ManiphestTaskDescriptionHeraldField' => 'ManiphestTaskHeraldField',
'ManiphestTaskDetailController' => 'ManiphestController',
'ManiphestTaskEditBulkJobType' => 'PhabricatorWorkerBulkJobType',
'ManiphestTaskEditProController' => 'ManiphestController',
'ManiphestTaskEditController' => 'ManiphestController',
'ManiphestTaskHasCommitEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasMockEdgeType' => 'PhabricatorEdgeType',
'ManiphestTaskHasRevisionEdgeType' => 'PhabricatorEdgeType',

View file

@ -265,7 +265,7 @@ final class PhabricatorConfigWelcomeController
$maniphest_uri = PhabricatorEnv::getURI('/maniphest/');
$maniphest_create_uri = PhabricatorEnv::getURI('/maniphest/editpro/');
$maniphest_create_uri = PhabricatorEnv::getURI('/maniphest/task/edit/');
$maniphest_all_uri = PhabricatorEnv::getURI('/maniphest/query/all/');
$quick[] = $this->newItem(
$request,

View file

@ -54,6 +54,8 @@ final class PhabricatorManiphestApplication extends PhabricatorApplication {
'/T(?P<id>[1-9]\d*)' => 'ManiphestTaskDetailController',
'/maniphest/' => array(
'(?:query/(?P<queryKey>[^/]+)/)?' => 'ManiphestTaskListController',
$this->getEditRoutePattern('edit/')
=> 'ManiphestTaskEditController',
'report/(?:(?P<view>\w+)/)?' => 'ManiphestReportController',
'batch/' => 'ManiphestBatchEditController',
'task/' => array(
@ -67,8 +69,6 @@ final class PhabricatorManiphestApplication extends PhabricatorApplication {
),
'export/(?P<key>[^/]+)/' => 'ManiphestExportController',
'subpriority/' => 'ManiphestSubpriorityController',
$this->getEditRoutePattern('editpro/')
=> 'ManiphestTaskEditProController',
),
);
}

View file

@ -143,7 +143,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
id(new PhabricatorActionView())
->setName(pht('Edit Task'))
->setIcon('fa-pencil')
->setHref($this->getApplicationURI("/editpro/{$id}/"))
->setHref($this->getApplicationURI("/task/edit/{$id}/"))
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
@ -163,12 +163,12 @@ final class ManiphestTaskDetailController extends ManiphestController {
$can_create = (bool)$edit_config;
if ($can_create) {
$form_key = $edit_config->getIdentifier();
$edit_uri = "/editpro/form/{$form_key}/?parent={$id}&template={$id}";
$edit_uri = "/task/edit/form/{$form_key}/?parent={$id}&template={$id}";
$edit_uri = $this->getApplicationURI($edit_uri);
} else {
// TODO: This will usually give us a somewhat-reasonable error page, but
// could be a bit cleaner.
$edit_uri = "/editpro/{$id}/";
$edit_uri = "/task/edit/{$id}/";
$edit_uri = $this->getApplicationURI($edit_uri);
}

View file

@ -1,6 +1,6 @@
<?php
final class ManiphestTaskEditProController extends ManiphestController {
final class ManiphestTaskEditController extends ManiphestController {
public function handleRequest(AphrontRequest $request) {
return id(new ManiphestEditEngine())

View file

@ -136,11 +136,6 @@ final class ManiphestEditEngine
);
}
protected function getEditorURI() {
// TODO: Remove when cutting over.
return $this->getApplication()->getApplicationURI('editpro/');
}
private function getTaskStatusMap(ManiphestTask $task) {
$status_map = ManiphestTaskStatus::getTaskStatusMap();

View file

@ -111,7 +111,7 @@ final class ManiphestTaskListView extends ManiphestView {
));
if ($this->showBatchControls) {
$href = new PhutilURI('/maniphest/editpro/'.$task->getID().'/');
$href = new PhutilURI('/maniphest/task/edit/'.$task->getID().'/');
if (!$this->showSubpriorityControls) {
$href->setQueryParam('ungrippable', 'true');
}

View file

@ -778,9 +778,9 @@ final class PhabricatorProjectBoardViewController
->loadDefaultEditConfiguration();
if ($edit_config) {
$form_key = $edit_config->getIdentifier();
$create_uri = "/maniphest/editpro/form/{$form_key}/";
$create_uri = "/maniphest/task/edit/form/{$form_key}/";
} else {
$create_uri = '/maniphest/editpro/';
$create_uri = '/maniphest/task/edit/';
}
return $create_uri;

View file

@ -66,7 +66,7 @@ final class ProjectBoardTaskCard extends Phobject {
->setName(pht('Edit'))
->setIcon('fa-pencil')
->addSigil('edit-project-card')
->setHref('/maniphest/editpro/'.$task->getID().'/'))
->setHref('/maniphest/task/edit/'.$task->getID().'/'))
->setBarColor($bar_color);
if ($owner) {