1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-24 22:40:55 +01:00

Fix one straggler milestone URI

Summary: I missed this during cleanup.

Test Plan: Go to a project, then: Subprojects, Create Milestone, Cancel. No longer 404/fatals.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15241
This commit is contained in:
epriestley 2016-02-11 09:43:30 -08:00
parent 968ac76453
commit 705c8c956a
2 changed files with 4 additions and 10 deletions

View file

@ -65,8 +65,6 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
=> $this->getPanelRouting('PhabricatorProjectPanelController'), => $this->getPanelRouting('PhabricatorProjectPanelController'),
'subprojects/(?P<id>[1-9]\d*)/' 'subprojects/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectSubprojectsController', => 'PhabricatorProjectSubprojectsController',
'milestones/(?P<id>[1-9]\d*)/'
=> 'PhabricatorProjectMilestonesController',
'board/(?P<id>[1-9]\d*)/'. 'board/(?P<id>[1-9]\d*)/'.
'(?P<filter>filter/)?'. '(?P<filter>filter/)?'.
'(?:query/(?P<queryKey>[^/]+)/)?' '(?:query/(?P<queryKey>[^/]+)/)?'

View file

@ -88,15 +88,11 @@ final class PhabricatorProjectEditEngine
protected function getObjectCreateCancelURI($object) { protected function getObjectCreateCancelURI($object) {
$parent = $this->getParentProject(); $parent = $this->getParentProject();
if ($parent) {
$id = $parent->getID();
return "/project/subprojects/{$id}/";
}
$milestone = $this->getMilestoneProject(); $milestone = $this->getMilestoneProject();
if ($milestone) {
$id = $milestone->getID(); if ($parent || $milestone) {
return "/project/milestones/{$id}/"; $id = nonempty($parent, $milestone)->getID();
return "/project/subprojects/{$id}/";
} }
return parent::getObjectCreateCancelURI($object); return parent::getObjectCreateCancelURI($object);