1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

Legalpad - fix requires signature transaction from always being saved

Summary: Fixes T7295. Humbling debugging experience but I got it.

Test Plan: saved a legalpad doc without edits over and over and saw no "requires signature" transaction. toggled "requires signature", saved, and saw the transaction.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7295

Differential Revision: https://secure.phabricator.com/D11785
This commit is contained in:
Bob Trahan 2015-02-17 11:07:14 -08:00
parent e100961453
commit 82f47f9689

View file

@ -51,7 +51,7 @@ final class LegalpadDocumentEditor
case LegalpadTransactionType::TYPE_PREAMBLE:
return $object->getPreamble();
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
return $object->getRequireSignature();
return (bool)$object->getRequireSignature();
}
}
@ -64,8 +64,9 @@ final class LegalpadDocumentEditor
case LegalpadTransactionType::TYPE_TEXT:
case LegalpadTransactionType::TYPE_SIGNATURE_TYPE:
case LegalpadTransactionType::TYPE_PREAMBLE:
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
return $xaction->getNewValue();
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
return (bool)$xaction->getNewValue();
}
}
@ -92,7 +93,7 @@ final class LegalpadDocumentEditor
$object->setPreamble($xaction->getNewValue());
break;
case LegalpadTransactionType::TYPE_REQUIRE_SIGNATURE:
$object->setRequireSignature($xaction->getNewValue());
$object->setRequireSignature((int)$xaction->getNewValue());
break;
}
}