Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/view/PhabricatorGlobalUploadTargetView.php
Show First 20 Lines • Show All 61 Lines • ▼ Show 20 Lines | if (!$viewer->isLoggedIn()) { | ||||
return null; | return null; | ||||
} | } | ||||
$instructions_id = 'phabricator-global-drag-and-drop-upload-instructions'; | $instructions_id = 'phabricator-global-drag-and-drop-upload-instructions'; | ||||
require_celerity_resource('global-drag-and-drop-css'); | require_celerity_resource('global-drag-and-drop-css'); | ||||
$hint_text = $this->getHintText(); | $hint_text = $this->getHintText(); | ||||
if (!strlen($hint_text)) { | if (!phutil_nonempty_string($hint_text)) { | ||||
valerio.bozzolan: ✅ OK since the expected input domain is **NULL** (default) or a **string**. The phutil will… | |||||
$hint_text = "\xE2\x87\xAA ".pht('Drop Files to Upload'); | $hint_text = "\xE2\x87\xAA ".pht('Drop Files to Upload'); | ||||
} | } | ||||
// 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). | ||||
Show All 28 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0
✅ OK since the expected input domain is NULL (default) or a string. The phutil will throw for alien types, and it's OK.
Known usages: