Differential D25200 Diff 697 src/applications/calendar/xaction/PhabricatorCalendarImportICSFileTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/xaction/PhabricatorCalendarImportICSFileTransaction.php
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | if ($import_type != $ics_type) { | ||||
$import_type)); | $import_type)); | ||||
return $errors; | return $errors; | ||||
} | } | ||||
$new_value = $object->getParameter(self::PARAMKEY_FILE); | $new_value = $object->getParameter(self::PARAMKEY_FILE); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$new_value = $xaction->getNewValue(); | $new_value = $xaction->getNewValue(); | ||||
if (!strlen($new_value)) { | if (!phutil_nonempty_string($new_value)) { | ||||
continue; | continue; | ||||
} | } | ||||
$file = id(new PhabricatorFileQuery()) | $file = id(new PhabricatorFileQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withPHIDs(array($new_value)) | ->withPHIDs(array($new_value)) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$file) { | if (!$file) { | ||||
Show All 16 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