Only validate form subtype edits if subtype transactions are present

Summary: Fixes T12347. Ref T12314. Validation gets called no matter what, but is only relevant if the form supports subtypes.

Test Plan: Marked/unmarked a Paste form as editable.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12347, T12314

Differential Revision: https://secure.phabricator.com/D17457
This commit is contained in:
epriestley 2017-03-03 13:41:44 -08:00
parent d2a420d13a
commit 5ed90b2235

View file

@ -57,6 +57,7 @@ final class PhabricatorEditEngineConfigurationEditor
}
break;
case PhabricatorEditEngineConfigurationTransaction::TYPE_SUBTYPE:
if ($xactions) {
$map = $object->getEngine()
->setViewer($this->getActor())
->newSubtypeMap();
@ -73,6 +74,7 @@ final class PhabricatorEditEngineConfigurationEditor
pht('Subtype "%s" is not a valid subtype.', $new),
$xaction);
}
}
break;
}