Differential D15911 Diff 38327 src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/editor/PhabricatorOwnersPackageTransactionEditor.php
| Show First 20 Lines • Show All 199 Lines • ▼ Show 20 Lines | switch ($type) { | ||||
| $type, | $type, | ||||
| pht('Required'), | pht('Required'), | ||||
| pht('Package name is required.'), | pht('Package name is required.'), | ||||
| nonempty(last($xactions), null)); | nonempty(last($xactions), null)); | ||||
| $error->setIsMissingFieldError(true); | $error->setIsMissingFieldError(true); | ||||
| $errors[] = $error; | $errors[] = $error; | ||||
| } | } | ||||
| foreach ($xactions as $xaction) { | |||||
| $new = $xaction->getNewValue(); | |||||
| if (preg_match('([,!])', $new)) { | |||||
| $errors[] = new PhabricatorApplicationTransactionValidationError( | |||||
| $type, | |||||
| pht('Invalid'), | |||||
| pht( | |||||
| 'Package names may not contain commas (",") or exclamation '. | |||||
| 'marks ("!"). These characters are ambiguous when package '. | |||||
| 'names are parsed from the command line.'), | |||||
| $xaction); | |||||
| } | |||||
| } | |||||
| break; | break; | ||||
| case PhabricatorOwnersPackageTransaction::TYPE_PATHS: | case PhabricatorOwnersPackageTransaction::TYPE_PATHS: | ||||
| if (!$xactions) { | if (!$xactions) { | ||||
| continue; | continue; | ||||
| } | } | ||||
| $old = mpull($object->getPaths(), 'getRef'); | $old = mpull($object->getPaths(), 'getRef'); | ||||
| foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
| ▲ Show 20 Lines • Show All 133 Lines • Show Last 20 Lines | |||||