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
This commit is contained in:
		| @@ -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()) { |   public function buildCrumbs(array $spec = array()) { | ||||||
|     $crumbs = $this->buildApplicationCrumbs(); |     $crumbs = $this->buildApplicationCrumbs(); | ||||||
|     $crumb_list = $this->buildCrumbList($spec); |     $crumb_list = $this->buildCrumbList($spec); | ||||||
| @@ -258,23 +235,4 @@ abstract class DiffusionController extends PhabricatorController { | |||||||
|       ->appendChild($body); |       ->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; |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 epriestley
					epriestley