diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 947c9b99c5..cf8fc0b533 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -950,8 +950,10 @@ phutil_register_library_map(array( 'LegalpadDocumentSignatureVerificationController' => 'applications/legalpad/controller/LegalpadDocumentSignatureVerificationController.php', 'LegalpadDocumentSignatureViewController' => 'applications/legalpad/controller/LegalpadDocumentSignatureViewController.php', 'LegalpadMockMailReceiver' => 'applications/legalpad/mail/LegalpadMockMailReceiver.php', + 'LegalpadObjectNeedsSignatureEdgeType' => 'applications/legalpad/edge/LegalpadObjectNeedsSignatureEdgeType.php', 'LegalpadReplyHandler' => 'applications/legalpad/mail/LegalpadReplyHandler.php', 'LegalpadSchemaSpec' => 'applications/legalpad/storage/LegalpadSchemaSpec.php', + 'LegalpadSignatureNeededByObjectEdgeType' => 'applications/legalpad/edge/LegalpadSignatureNeededByObjectEdgeType.php', 'LegalpadTransaction' => 'applications/legalpad/storage/LegalpadTransaction.php', 'LegalpadTransactionComment' => 'applications/legalpad/storage/LegalpadTransactionComment.php', 'LegalpadTransactionQuery' => 'applications/legalpad/query/LegalpadTransactionQuery.php', @@ -4050,8 +4052,10 @@ phutil_register_library_map(array( 'LegalpadDocumentSignatureVerificationController' => 'LegalpadController', 'LegalpadDocumentSignatureViewController' => 'LegalpadController', 'LegalpadMockMailReceiver' => 'PhabricatorObjectMailReceiver', + 'LegalpadObjectNeedsSignatureEdgeType' => 'PhabricatorEdgeType', 'LegalpadReplyHandler' => 'PhabricatorMailReplyHandler', 'LegalpadSchemaSpec' => 'PhabricatorConfigSchemaSpec', + 'LegalpadSignatureNeededByObjectEdgeType' => 'PhabricatorEdgeType', 'LegalpadTransaction' => 'PhabricatorApplicationTransaction', 'LegalpadTransactionComment' => 'PhabricatorApplicationTransactionComment', 'LegalpadTransactionQuery' => 'PhabricatorApplicationTransactionQuery', diff --git a/src/applications/differential/customfield/DifferentialRequiredSignaturesField.php b/src/applications/differential/customfield/DifferentialRequiredSignaturesField.php index 85dcc32d5a..2408daa27c 100644 --- a/src/applications/differential/customfield/DifferentialRequiredSignaturesField.php +++ b/src/applications/differential/customfield/DifferentialRequiredSignaturesField.php @@ -39,7 +39,7 @@ final class DifferentialRequiredSignaturesField $phids = PhabricatorEdgeQuery::loadDestinationPHIDs( $revision->getPHID(), - PhabricatorEdgeConfig::TYPE_OBJECT_NEEDS_SIGNATURE); + LegalpadObjectNeedsSignatureEdgeType::EDGECONST); if ($phids) { diff --git a/src/applications/differential/editor/DifferentialTransactionEditor.php b/src/applications/differential/editor/DifferentialTransactionEditor.php index a0981544b9..c8d9ce86ef 100644 --- a/src/applications/differential/editor/DifferentialTransactionEditor.php +++ b/src/applications/differential/editor/DifferentialTransactionEditor.php @@ -1633,7 +1633,7 @@ final class DifferentialTransactionEditor // If we still have something to trigger, add the edges. if ($legal_phids) { - $edge_legal = PhabricatorEdgeConfig::TYPE_OBJECT_NEEDS_SIGNATURE; + $edge_legal = LegalpadObjectNeedsSignatureEdgeType::EDGECONST; $xactions[] = id(new DifferentialTransaction()) ->setTransactionType(PhabricatorTransactions::TYPE_EDGE) ->setMetadataValue('edge:type', $edge_legal) diff --git a/src/applications/legalpad/edge/LegalpadObjectNeedsSignatureEdgeType.php b/src/applications/legalpad/edge/LegalpadObjectNeedsSignatureEdgeType.php new file mode 100644 index 0000000000..dfc5843fd2 --- /dev/null +++ b/src/applications/legalpad/edge/LegalpadObjectNeedsSignatureEdgeType.php @@ -0,0 +1,102 @@ + self::TYPE_WATCHER_HAS_OBJECT, self::TYPE_WATCHER_HAS_OBJECT => self::TYPE_OBJECT_HAS_WATCHER, - - self::TYPE_OBJECT_NEEDS_SIGNATURE => - self::TYPE_SIGNATURE_NEEDED_BY_OBJECT, - self::TYPE_SIGNATURE_NEEDED_BY_OBJECT => - self::TYPE_OBJECT_NEEDS_SIGNATURE, ); return idx($map, $edge_type); @@ -308,8 +300,6 @@ final class PhabricatorEdgeConfig extends PhabricatorEdgeConstants { return '%s added %d dashboard(s): %s.'; case self::TYPE_OBJECT_HAS_WATCHER: return '%s added %d watcher(s): %s.'; - case self::TYPE_OBJECT_NEEDS_SIGNATURE: - return '%s added %d required legal document(s): %s.'; case self::TYPE_SUBSCRIBED_TO_OBJECT: case self::TYPE_UNSUBSCRIBED_FROM_OBJECT: case self::TYPE_FILE_HAS_OBJECT: diff --git a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php index 85b718ec6b..c80d58fba5 100644 --- a/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorBaseEnglishTranslation.php @@ -914,7 +914,7 @@ abstract class PhabricatorBaseEnglishTranslation ), ), - '%s added %d required legal document(s): %s.' => array( + '%s added %s required legal document(s): %s.' => array( array( '%s added a required legal document: %3$s.', '%s added required legal documents: %3$s.',