Page MenuHomePhabricator

Properly version Legalpad documents
ClosedPublic

Authored by chad on Jul 26 2017, 2:55 AM.
Tags
None
Referenced Files
F19880290: D18280.id43964.diff
Wed, Mar 18, 5:05 AM
F19877487: D18280.diff
Mar 16 2026, 5:42 PM
F19862348: D18280.id43965.diff
Mar 14 2026, 10:23 AM
F19804136: D18280.id43963.diff
Mar 2 2026, 5:24 AM
F19802820: D18280.id43963.diff
Mar 1 2026, 7:10 PM
F19555204: D18280.id43964.diff
Jan 30 2026, 10:25 AM
F18823614: D18280.diff
Oct 23 2025, 12:41 PM
F18823058: D18280.diff
Oct 23 2025, 10:02 AM
Subscribers

Details

Summary

Fixes T12933. This now creates a new DocumentBody when creating or editing a legalpad document.

Test Plan

Create a new document, edit document. Check database that version is saved as new row, and timestamps are correct.

mysql> select * from legalpad_documentbody;
+----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+
| id | phid                           | creatorPHID                    | documentPHID                   | version | title         | text   | dateCreated | dateModified |
+----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+
|  1 | PHID-LEGB-nsgzqklzfmjahlcgobm7 | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-v7mc3xyithjvbiqeksbj |       2 | Legal Title 1 | Body 2 |  1501037011 |   1501037081 |
|  2 | PHID-LEGB-2kaytwmjusljib6pjycc | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-v7mc3xyithjvbiqeksbj |       3 | Legal Title 1 | Body 3 |  1501037521 |   1501037521 |
|  3 | PHID-LEGB-h6q6bi42w4rgxrhk3qdb | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-7gxuhafvkoy2izkv4gdd |       1 | New 2         | asdf   |  1501037553 |   1501037553 |
+----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+
3 rows in set (0.00 sec)

Diff Detail

Repository
rP Phabricator
Branch
legalpad-versions (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 17807
Build 23915: Run Core Tests
Build 23914: arc lint + arc unit

Event Timeline

  • add a migration script
epriestley added inline comments.
src/applications/legalpad/editor/LegalpadDocumentEditor.php
55

Slightly more correct as $this->getActingAsPHID(), so we get a better PHID if an omnipotent user is acting for an application or a real user. This probably never happens on this codepath today.

This revision is now accepted and ready to land.Jul 26 2017, 2:52 PM
This revision was automatically updated to reflect the committed changes.