This seems to work, but I couldn't figure out how to pass over a Caption for a text field.
Details
- Reviewers
epriestley - Commits
- Restricted Diffusion Commit
rP36bfff389822: Give PhameBlog an EditEngine
New blog, Edit blog.
Diff Detail
- Repository
- rP Phabricator
- Branch
- phame-blog-edit-engine (branched from master)
- Lint
Lint Passed - Unit
Tests Passed - Build Status
Buildable 9529 Build 11378: Run Core Tests Build 11377: arc lint + arc unit
Event Timeline
I'll add caption support at some point, but I think this is fine without it for now -- that field needs some work anyway to handle a few other open issues.
src/applications/phame/editor/PhameBlogEditEngine.php | ||
---|---|---|
41–47 | I think these are the default and can be omitted now, without any change in behavior. | |
69 | For consistency, prefer customDomain (or just domain). |
src/applications/phame/storage/PhameBlog.php | ||
---|---|---|
56–59 ↗ | (On Diff #35784) | Hitting a bug here, where you can't have multiple "blank" domains. What's the best fix? Assume we need to move the check to Transactions and alter the MySQL table. |
The thing probably allows multiple null domains but not multiple "empty string" domains, and maybe the old controller had some weird logic to do a little hokey-pokey jig. Let me check...
Yeah, see inline.
Easiest fix is probably in PhameBlogEditor->getCustomTransactionNewValue(). For the TYPE_DOMAIN transaction, do something like this:
$new = $xaction->getNewValue(); if (!strlen($new)) { $new = null; } return $new;
That should fix it, I think.
src/applications/phame/controller/blog/PhameBlogEditController.php | ||
---|---|---|
59 | Yeah, this looks like it. |