Homec4science

Fix three minor edge case behaviors in Conpherence

Authored by epriestley <git@epriestley.com> on Mar 11 2014, 00:21.

Description

Fix three minor edge case behaviors in Conpherence

Summary:
Couple of tweaks:

  • If a conpherence has no participants, we fail to attachParticipants(). This can happen if you leave a Conpherence as the last participant, then visit the URI again explicitly.
  • If you can't load any transactions (usually, because you don't have permission to view a thread's transactions), we try to attach null instead of array(). This can happen if you attempt to view a thread you don't have permission to see. A more general fix would be to tweak the load/filtering order, but I'm leaving that for another time since it's more involved and only gives us a small performance gain in unusual sitautions.
  • initializeNewThread() should be declared static.

Test Plan:

  • Viewed a thread with no participants, got proper policy error.
  • Viewed a thread I couldn't see, got proper policy error.
  • Grepped for initializeNewThread().

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D8467

Details

Committed
epriestley <git@epriestley.com>Mar 11 2014, 00:21
Pushed
aubortJan 31 2017, 17:16
Parents
rPH5854de8c1c47: Don't 302 to an external URI, even after CSRF POST
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPH042ab0ad9d03: Fix three minor edge case behaviors in Conpherence (authored by epriestley <git@epriestley.com>).Mar 11 2014, 00:21