1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 17:22:42 +01:00
phorge-phorge/src/applications/phame
epriestley 9f5e6bee90 Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw"
Summary:
Depends on D20115. See <https://discourse.phabricator-community.org/t/transaction-search-endpoint-does-not-work-on-differential-diffs/2369/>.

Currently, `getApplicationTransactionCommentObject()` throws by default. Subclasses must override it to `return null` to indicate that they don't support comments.

This is silly, and leads to a bunch of code that does a `try / catch` around it, and at least some code (here, `transaction.search`) which doesn't `try / catch` and gets the wrong behavior as a result.

Just make it `return null` by default, meaning "no support for comments". Then remove the `try / catch` stuff and all the `return null` implementations.

Test Plan:
  - Grepped for `getApplicationTransactionCommentObject()`, fixed each callsite / definition.
  - Called `transaction.search` on a diff with transactions (i.e., not a sourced-from-commit diff).

Reviewers: amckinley

Reviewed By: amckinley

Subscribers: jbrownEP

Differential Revision: https://secure.phabricator.com/D20121
2019-02-07 14:56:38 -08:00
..
application Revert the alternate menu names for applications 2018-04-08 10:20:24 -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 Rename "PHUIDocumentViewPro" to "PHUIDocumentView" 2018-08-28 14:53:07 -07:00
editor Allow "Change Subtype" to be selected from the comment action stack 2018-11-28 13:40:40 -08:00
herald Define available Herald rule repetition options in terms of "isSingleEventAdapter()" 2018-01-26 11:02:35 -08:00
mail Allow multiple mail receivers to react to an individual email 2019-01-16 12:28:02 -08: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 Make the default behavior of getApplicationTransactionCommentObject() "return null" instead of "throw" 2019-02-07 14:56:38 -08: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