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:
parent
cdb8ea27e5
commit
6f1b39c0b8
1 changed files with 7 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue