From 366861f10660f64014eeccab9533cb65e3dd019d Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 30 Apr 2014 11:39:14 -0700 Subject: [PATCH] Revert the global "not imported yet" warning in Diffusion until we have better support Summary: Partially reverts D8903. This was hacky to begin with, but completely breaks if the filetree is enabled (`$view` is not an array). Just toss it until we have a more structured way to insert it into the document properly. I don't think it's especially important (the Herald warning is way more important). Test Plan: Multiple users reported that stuff is no longer broken. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Differential Revision: https://secure.phabricator.com/D8914 --- .../controller/DiffusionController.php | 42 ------------------- 1 file changed, 42 deletions(-) diff --git a/src/applications/diffusion/controller/DiffusionController.php b/src/applications/diffusion/controller/DiffusionController.php index 3752a9f9cb..ab80ff3c3a 100644 --- a/src/applications/diffusion/controller/DiffusionController.php +++ b/src/applications/diffusion/controller/DiffusionController.php @@ -40,29 +40,6 @@ abstract class DiffusionController extends PhabricatorController { } } - public function buildApplicationPage($view, array $options) { - if ($this->diffusionRequest) { - $drequest = $this->getDiffusionRequest(); - $repository = $drequest->getRepository(); - $error_view = $this->buildRepositoryWarning($repository); - - $views = array(); - $not_inserted = true; - foreach ($view as $view_object_or_array) { - $views[] = $view_object_or_array; - if ($not_inserted && - $view_object_or_array instanceof PhabricatorCrumbsView) { - $views[] = $error_view; - $not_inserted = false; - } - } - } else { - $views = $view; - } - - return parent::buildApplicationPage($views, $options); - } - public function buildCrumbs(array $spec = array()) { $crumbs = $this->buildApplicationCrumbs(); $crumb_list = $this->buildCrumbList($spec); @@ -258,23 +235,4 @@ abstract class DiffusionController extends PhabricatorController { ->appendChild($body); } - private function buildRepositoryWarning(PhabricatorRepository $repository) { - $error_view = null; - $title = null; - if ($repository->isImporting()) { - $title = pht('This repository is still importing.'); - $body = pht('Things may not work properly until the import finishes.'); - } else if (!$repository->isTracked()) { - $title = pht('This repository is not tracked.'); - $body = pht( - 'Things may not work properly until tracking is enabled and '. - 'importing finishes.'); - } - - if ($title) { - $error_view = $this->renderStatusMessage($title, $body); - } - - return $error_view; - } }