1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00

Fix call to isGlobalDragAndDropUploadEnabled() from pages with no controller

Summary: Fixes T7902. Some kinds of error pages, including the 404 page, may not have a controller when they reach this method.

Test Plan: Hit 404 page.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T7902

Differential Revision: https://secure.phabricator.com/D12538
This commit is contained in:
epriestley 2015-04-24 09:11:09 -07:00
parent cdb8ea27e5
commit 6f1b39c0b8

View file

@ -643,13 +643,19 @@ final class PhabricatorStandardPageView extends PhabricatorBarePageView {
if ($console) {
$console_config = $this->getConsoleConfig();
}
$upload_enabled = false;
if ($controller) {
$upload_enabled = $controller->isGlobalDragAndDropUploadEnabled();
}
return array(
'title' => $this->getTitle(),
'aphlictDropdownData' => array(
$dropdown_query->getNotificationData(),
$dropdown_query->getConpherenceData(),
),
'globalDragAndDrop' => $controller->isGlobalDragAndDropUploadEnabled(),
'globalDragAndDrop' => $upload_enabled,
'aphlictDropdowns' => $rendered_dropdowns,
'hisecWarningConfig' => $hisec_warning_config,
'consoleConfig' => $console_config,