Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/editor/ManiphestTransactionEditor.php
| Show First 20 Lines • Show All 710 Lines • ▼ Show 20 Lines | if ($adjacent) { | ||||
| } else { | } else { | ||||
| $sub = ($base + $step); | $sub = ($base + $step); | ||||
| } | } | ||||
| } | } | ||||
| return array($dst->getPriority(), $sub); | return array($dst->getPriority(), $sub); | ||||
| } | } | ||||
| protected function validateTransaction( | |||||
| PhabricatorLiskDAO $object, | |||||
| $type, | |||||
| array $xactions) { | |||||
| $errors = parent::validateTransaction($object, $type, $xactions); | |||||
| switch ($type) { | |||||
| case ManiphestTransaction::TYPE_TITLE: | |||||
| $missing = $this->validateIsEmptyTextField( | |||||
| $object->getTitle(), | |||||
| $xactions); | |||||
| if ($missing) { | |||||
| $error = new PhabricatorApplicationTransactionValidationError( | |||||
| $type, | |||||
| pht('Required'), | |||||
| pht('Task title is required.'), | |||||
| nonempty(last($xactions), null)); | |||||
| $error->setIsMissingFieldError(true); | |||||
| $errors[] = $error; | |||||
| } | |||||
| break; | |||||
| } | |||||
| return $errors; | |||||
| } | |||||
| } | } | ||||