Differential D20448 Diff 48800 src/applications/project/xaction/column/PhabricatorProjectColumnNameTransaction.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/xaction/column/PhabricatorProjectColumnNameTransaction.php
Show All 35 Lines | final class PhabricatorProjectColumnNameTransaction | ||||
} | } | ||||
public function validateTransactions($object, array $xactions) { | public function validateTransactions($object, array $xactions) { | ||||
$errors = array(); | $errors = array(); | ||||
if ($this->isEmptyTextTransaction($object->getName(), $xactions)) { | if ($this->isEmptyTextTransaction($object->getName(), $xactions)) { | ||||
// The default "Backlog" column is allowed to be unnamed, which | // The default "Backlog" column is allowed to be unnamed, which | ||||
// means we use the default name. | // means we use the default name. | ||||
if (!$object->isDefaultColumn()) { | |||||
// Proxy columns can't have a name, so don't raise an error here. | |||||
if (!$object->isDefaultColumn() && !$object->getProxy()) { | |||||
$errors[] = $this->newRequiredError( | $errors[] = $this->newRequiredError( | ||||
pht('Columns must have a name.')); | pht('Columns must have a name.')); | ||||
} | } | ||||
} | } | ||||
$max_length = $object->getColumnMaximumByteLength('name'); | $max_length = $object->getColumnMaximumByteLength('name'); | ||||
foreach ($xactions as $xaction) { | foreach ($xactions as $xaction) { | ||||
$new_value = $xaction->getNewValue(); | $new_value = $xaction->getNewValue(); | ||||
Show All 14 Lines |