1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 03:12:41 +01:00
phorge-phorge/src/applications/phame
epriestley a90b16e83a Define available Herald rule repetition options in terms of "isSingleEventAdapter()"
Summary:
Depends on D18924. Ref T13048. Each adapter defines which repetition options ("every time", "only the first time") users may select for rules.

Currently, this is all explicit and hard-coded. However, every adapter really just implements this rule (except for some bugs, see below):

> You can pick "only the first time" if this adapter fires more than once on the same object.

Since we already have a `isSingleEventAdapter()` method which lets us tell if an adapter fires more than once, just write this rule in the base class and delete all the copy/pasting.

This also fixes two bugs because of the copy/pasting: Pholio Mocks and Phriction Documents did not allow you to write "only the first time" rules. There's no reason for this, they just didn't copy/paste enough methods when they were implemented.

This will make a future diff (which introduces an "if the rule did not match last time" policy) cleaner.

Test Plan:
  - Checked several different types of rules, saw appropriate options in the dropdown (pre-commit: no options; tasks: first or every).
  - Checked mocks and wiki docs, saw that you can now write "only the first time" rules.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T13048

Differential Revision: https://secure.phabricator.com/D18925
2018-01-26 11:02:35 -08:00
..
application Update menu item names for Applications -> Favorites 2017-09-05 19:05:03 -07:00
capability Add Can Create Policy Capability to Phame Blogs 2015-11-08 07:00:18 -08:00
conduit Provide phame.post.edit Conduit API method 2015-12-28 06:55:35 -08:00
constants Ability to archive Phame Posts 2016-06-13 10:47:53 -07:00
controller Fix fatal on logged out Phame Post 2017-08-25 08:47:59 -07:00
editor Fix fatal on logged out Phame Post 2017-08-25 08:47:59 -07:00
herald Define available Herald rule repetition options in terms of "isSingleEventAdapter()" 2018-01-26 11:02:35 -08:00
mail Use CommentEditEngine in PhamePost 2016-07-06 12:28:59 -07:00
phid Use CommentEditEngine in PhamePost 2016-07-06 12:28:59 -07:00
query Support Ferret engine in Phame 2017-09-07 13:24:07 -07:00
remarkup Use CommentEditEngine in PhamePost 2016-07-06 12:28:59 -07:00
search Support Ferret engine in Phame 2017-09-07 13:24:07 -07:00
site Allow custom Sites to have custom 404 controllers 2016-11-30 15:25:09 -08:00
storage Fix a couple of other missing getApplicationTransactionCommentObject() implementations 2017-10-24 09:05:23 -07:00
typeahead Improve PhamePost search options 2016-06-30 12:56:28 -07:00
view Improve some Phame custom domain remarkup and link behaviors 2016-06-02 06:28:06 -07:00
xaction Fix fatal on logged out Phame Post 2017-08-25 08:47:59 -07:00