Differential D18693 Diff 44881 src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/calendar/xaction/PhabricatorCalendarImportFrequencyTransaction.php
Show All 26 Lines | public function validateTransactions($object, array $xactions) { | ||||
$valid = array_fuse($valid); | $valid = array_fuse($valid); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$value = $xaction->getNewValue(); | $value = $xaction->getNewValue(); | ||||
if (!isset($valid[$value])) { | if (!isset($valid[$value])) { | ||||
$errors[] = $this->newInvalidError( | $errors[] = $this->newInvalidError( | ||||
pht( | pht( | ||||
'Import frequency "%s" is not valid. Valid frequences are: %s.', | 'Import frequency "%s" is not valid. Valid frequencies are: %s.', | ||||
$value, | $value, | ||||
implode(', ', $valid)), | implode(', ', $valid)), | ||||
$xaction); | $xaction); | ||||
} | } | ||||
} | } | ||||
return $errors; | return $errors; | ||||
} | } | ||||
} | } |