mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-24 14:30:56 +01:00
Unfatal "Create Repository" UI
See: <https://github.com/facebook/phabricator/issues/584> Not all controllers in Diffusion have a DiffusionRequest. Auditors: btrahan
This commit is contained in:
parent
466af33147
commit
d5f874b493
1 changed files with 16 additions and 11 deletions
|
@ -41,20 +41,25 @@ abstract class DiffusionController extends PhabricatorController {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildApplicationPage($view, array $options) {
|
public function buildApplicationPage($view, array $options) {
|
||||||
$drequest = $this->getDiffusionRequest();
|
if ($this->diffusionRequest) {
|
||||||
$repository = $drequest->getRepository();
|
$drequest = $this->getDiffusionRequest();
|
||||||
$error_view = $this->buildRepositoryWarning($repository);
|
$repository = $drequest->getRepository();
|
||||||
|
$error_view = $this->buildRepositoryWarning($repository);
|
||||||
|
|
||||||
$views = array();
|
$views = array();
|
||||||
$not_inserted = true;
|
$not_inserted = true;
|
||||||
foreach ($view as $view_object_or_array) {
|
foreach ($view as $view_object_or_array) {
|
||||||
$views[] = $view_object_or_array;
|
$views[] = $view_object_or_array;
|
||||||
if ($not_inserted &&
|
if ($not_inserted &&
|
||||||
$view_object_or_array instanceof PhabricatorCrumbsView) {
|
$view_object_or_array instanceof PhabricatorCrumbsView) {
|
||||||
$views[] = $error_view;
|
$views[] = $error_view;
|
||||||
$not_inserted = false;
|
$not_inserted = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
$views = $view;
|
||||||
}
|
}
|
||||||
|
|
||||||
return parent::buildApplicationPage($views, $options);
|
return parent::buildApplicationPage($views, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue