Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/controller/PhabricatorFileViewController.php
Show First 20 Lines • Show All 305 Lines • ▼ Show 20 Lines | private function buildPropertyViews( | ||||
} | } | ||||
$finfo->addProperty(pht('Storage Format'), $format_name); | $finfo->addProperty(pht('Storage Format'), $format_name); | ||||
$finfo->addProperty( | $finfo->addProperty( | ||||
pht('Storage Handle'), | pht('Storage Handle'), | ||||
$file->getStorageHandle()); | $file->getStorageHandle()); | ||||
$custom_alt = $file->getCustomAltText(); | $custom_alt = $file->getCustomAltText(); | ||||
if (strlen($custom_alt)) { | if (phutil_nonempty_string($custom_alt)) { | ||||
valerio.bozzolan: ✅ I verified the above line
The `$custom_alt` variable is the alternative image text that… | |||||
$finfo->addProperty(pht('Custom Alt Text'), $custom_alt); | $finfo->addProperty(pht('Custom Alt Text'), $custom_alt); | ||||
} | } | ||||
$default_alt = $file->getDefaultAltText(); | $default_alt = $file->getDefaultAltText(); | ||||
if (strlen($default_alt)) { | if (strlen($default_alt)) { | ||||
$finfo->addProperty(pht('Default Alt Text'), $default_alt); | $finfo->addProperty(pht('Default Alt Text'), $default_alt); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 171 Lines • Show Last 20 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
✅ I verified the above line
The $custom_alt variable is the alternative image text that assumes null as default, or a string.
The function phutil_nonempty_string() will report alien types, and this is OK here.