Changeset View
Changeset View
Standalone View
Standalone View
src/applications/files/xaction/PhabricatorFileAltTextTransaction.php
Show All 21 Lines | final class PhabricatorFileAltTextTransaction | ||||
public function applyInternalEffects($object, $value) { | public function applyInternalEffects($object, $value) { | ||||
$object->setCustomAltText($value); | $object->setCustomAltText($value); | ||||
} | } | ||||
public function getTitle() { | public function getTitle() { | ||||
$old_value = $this->getOldValue(); | $old_value = $this->getOldValue(); | ||||
$new_value = $this->getNewValue(); | $new_value = $this->getNewValue(); | ||||
if (!strlen($old_value)) { | if (!phutil_nonempty_string($old_value)) { | ||||
return pht( | return pht( | ||||
'%s set the alternate text for this file to %s.', | '%s set the alternate text for this file to %s.', | ||||
$this->renderAuthor(), | $this->renderAuthor(), | ||||
$this->renderNewValue()); | $this->renderNewValue()); | ||||
} else if (!strlen($new_value)) { | } else if (!phutil_nonempty_string($new_value)) { | ||||
return pht( | return pht( | ||||
'%s removed the alternate text for this file (was %s).', | '%s removed the alternate text for this file (was %s).', | ||||
$this->renderAuthor(), | $this->renderAuthor(), | ||||
$this->renderOldValue()); | $this->renderOldValue()); | ||||
} else { | } else { | ||||
return pht( | return pht( | ||||
'%s changed the alternate text for this file from %s to %s.', | '%s changed the alternate text for this file from %s to %s.', | ||||
$this->renderAuthor(), | $this->renderAuthor(), | ||||
▲ Show 20 Lines • Show All 51 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