From ca6f13d90c35512c2b129d40955a0dfb5fe4b9c7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Thu, 22 Aug 2013 14:56:50 -0700 Subject: [PATCH] Fix Releeph project creation crumb generation Summary: Ref T3657. We currently try to generate a project crumb on the "Create Project" page, but fail. Paper that over until I can sort out T3657. Test Plan: Loaded project create page. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T3657 Differential Revision: https://secure.phabricator.com/D6793 --- .../controller/ReleephProjectController.php | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/applications/releeph/controller/ReleephProjectController.php b/src/applications/releeph/controller/ReleephProjectController.php index ca85781e69..2a0d774979 100644 --- a/src/applications/releeph/controller/ReleephProjectController.php +++ b/src/applications/releeph/controller/ReleephProjectController.php @@ -127,14 +127,21 @@ abstract class ReleephProjectController extends ReleephController { protected function buildApplicationCrumbs() { $crumbs = parent::buildApplicationCrumbs(); - $project = $this->getReleephProject(); - $project_id = $project->getID(); - $project_uri = $this->getApplicationURI("project/{$project_id}/"); + // TODO: The massive amount of derps here should be fixed once URIs get + // sorted out; see T3657. - $crumbs->addCrumb( - id(new PhabricatorCrumbView()) - ->setHref($project_uri) - ->setName($project->getName())); + try { + $project = $this->getReleephProject(); + $project_id = $project->getID(); + $project_uri = $this->getApplicationURI("project/{$project_id}/"); + + $crumbs->addCrumb( + id(new PhabricatorCrumbView()) + ->setHref($project_uri) + ->setName($project->getName())); + } catch (Exception $ex) { + // TODO: This is derps. + } try { $branch = $this->getReleephBranch(); @@ -144,7 +151,7 @@ abstract class ReleephProjectController extends ReleephController { ->setHref($branch_uri) ->setName($branch->getDisplayNameWithDetail())); } catch (Exception $ex) { - // TODO: This is kind of derps. + // TODO: This is also derps. } return $crumbs; -- 2.51.2