Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/view/PhabricatorGlobalUploadTargetView.php
Show First 20 Lines • Show All 72 Lines • ▼ Show 20 Lines | public function render() { | ||||
// Use the configured default view policy. Drag and drop uploads use | // Use the configured default view policy. Drag and drop uploads use | ||||
// a more restrictive view policy if we don't specify a policy explicitly, | // a more restrictive view policy if we don't specify a policy explicitly, | ||||
// as the more restrictive policy is correct for most drop targets (like | // as the more restrictive policy is correct for most drop targets (like | ||||
// Pholio uploads and Remarkup text areas). | // Pholio uploads and Remarkup text areas). | ||||
$view_policy = $this->getViewPolicy(); | $view_policy = $this->getViewPolicy(); | ||||
if ($view_policy === null) { | if ($view_policy === null) { | ||||
$view_policy = PhabricatorFile::initializeNewFile()->getViewPolicy(); | $view_policy = PhabricatorFile::initializeNewFile($viewer) | ||||
->getViewPolicy(); | |||||
} | } | ||||
$submit_uri = $this->getSubmitURI(); | $submit_uri = $this->getSubmitURI(); | ||||
$done_uri = '/file/query/authored/'; | $done_uri = '/file/query/authored/'; | ||||
Javelin::initBehavior('global-drag-and-drop', array( | Javelin::initBehavior('global-drag-and-drop', array( | ||||
'ifSupported' => $this->showIfSupportedID, | 'ifSupported' => $this->showIfSupportedID, | ||||
'instructions' => $instructions_id, | 'instructions' => $instructions_id, | ||||
Show All 17 Lines |