Don't show empty attributes.

Summary: Some places we pass in empty strings and get hanging middots. Would prefer not have the middot, and let the developer decide if they should set a 'nothing here' state.

Test Plan: Checked Repositories with no lint messages.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5920
Begin improving the soundness of received mail

Summary:
We/I broke a couple of things here recently (see D5911) and are doing some work here in general (see D5912, etc.).

Generally, this code is pretty oldschool and not especially well architected for modern application-oriented Phabricator. It hardcodes a lot of stuff which should be applications' responsibilites.

Take the first steps toward making it more solid to reduce the risk here. In particular:

  - Factor out the "self mail" and "duplicate mail" checks and add unit tests.
  - Make Message-ID hash handling automatic.

Test Plan: Ran unit tests.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5915
Add get Releeph Requests conduit method

Summary: Added "getrequests" conduit method

Test Plan: Open /conduit/method/differential.getrequests/ and try different inputs.

Reviewers: edward, epriestley

Reviewed By: edward

CC: aran, epriestley, Korvin

Maniphest Tasks: T3057

Differential Revision: https://secure.phabricator.com/D5788
Move some received mail responsibility to applications

Summary:
Ref T1205. Continuation of D5915.

Currently, `PhabricatorMetaMTAReceivedMail` has //all// the logic for routing mail. In particular:

  - New mail receivers in applications must edit it.
  - Mail receivers don't drop out when applications are uninstalled.

Applications have some logic in subclasses of `PhabricatorMailReplyHandler`, but this class is a bit of a mess. It is also heavily based on the assumption that mail receivers are objects (like revisions), but this is not true in at least two cases today (creating new tasks with `bugs@`, creating a new Conpherence thread) and likely other cases in the future (e.g., revision-by-mail).

Move this logic into a new `PhabricatorMailReceiver` classtree. This is similar to `PhabricatorMailReplyHandler` but a bit cleaner and more general. I plan to heavily reduce the responsibilities of `PhabricatorMailReplyHandler` or possibly eliminate it entirely.

For now, the new classtree doesn't do much of interest. The only behavioral change this diff causes is that Phabricator will now reject mail to an application when that application is uninstalled.

I also moved all the `ReplyHandler` classes into `mail/` directories in their respective applications.

Test Plan: Unit tests, used receive test to route mail to various objects.

Reviewers: btrahan

Reviewed By: btrahan

CC: Afaque_Hussain, edward, aran

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5922
Add 24px and 48 loading graphics.

Summary: Fixes T3156 - Adds nautical loading indicators.

Test Plan: Photoshop

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T3156

Differential Revision: https://secure.phabricator.com/D5905
Add fullWidth option to AphrontFormView

Summary: This piggybacks onto device-phone's CSS rules to enable a full width form (for smaller spaces).

Test Plan: Convert New Message dialog to fullWidth.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5924
Fix long thread titles in Conpherence

Summary: Fixes T3161 - Long Conpherence titles cause layout issues, picked a reasonable size to break it.

Test Plan: Create a long title, see the ellipses.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3161

Differential Revision: https://secure.phabricator.com/D5927
Diffusion - move DiffQuery to Conduit

Summary: title does not say it all; also added conduit wrappers for rawdiffquery and lastmodifiedquery. These get the wrapper treatment since they are used in daemons. Ref T2784.

Test Plan: for each of the 3 VCS, did the following: 1) loaded up CALLSIGN and verified 'Modified' column data showed up correctly in Browse Repository box. 2) loaded up the "change" view for a specific file and verified content showed up correctly. 3) loaded up a specific commit and noted the changes ajax loaded A-OK

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2784

Differential Revision: https://secure.phabricator.com/D5896
Add unit tests to cover PhabricatorMailReceiver::matchAddresses()

Summary: Ref T3183. We should accept addresses like `"New Bug" <bugs@example.com>` to match `bugs@example.com`.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3183

Differential Revision: https://secure.phabricator.com/D5923
Diffusion - move some DiffusionRequest queries to occur over Conduit

Summary: Ref T2784. This one was a wee bit complicated. Had to add PhabricatorUser and concept of initFromConduit (or not) to DiffusionRequest.

Test Plan: foreach repo, visited CALLSIGN and clicked a commit and verified they laoded correctly. Hacked code to hit NOT via Conduit and repeated tests to great success.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2784

Differential Revision: https://secure.phabricator.com/D5928
Adding Email Reply support for External Users.

Summary: Adding Email reply support for external users.

Test Plan: Please let me know if I have approached it correctly. Had few doubts. Will proceed after your comments :)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan, jennis.mekwan3

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5912
Fix missing 'user' in PhabricatorOwnerPathQuery

Summary:
See:

  - https://github.com/facebook/phabricator/issues/317
  - https://github.com/facebook/phabricator/issues/319

This callsite was just overlooked in D5928, I think.

Test Plan: Ran `scripts/repository/reparse.php --owners rXnnnn` without hitting an exception.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D5930
Fix empty titles on pages without application names

Summary: Fixes T3195. Currently, we show `[] Phabricator` on the homepage with unicode glyphs off.

Test Plan:
Viewed home page and application pages with glyphs on and off. Saw:

|              | Unicode | No Unicode     |
|              | ------- | ----------     |
| Home         | Empty   | Empty          |
| ----         |         |                |
| Differential | Gear    | Differential   |
| ----         |         |                |

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T3195

Differential Revision: https://secure.phabricator.com/D5932
Diffusion - fix bug from D5883

Summary: forgot to specify the commit! On github as https://github.com/facebook/phabricator/pull/318, though this is a tighter fix.

Test Plan: tried to save an owners package with a folder - FAIL - then with the patch - GREAT SUCCESS

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D5933
Copy mail sender selection logic into MailReceivers

Summary: Copies sender identification logic into MailReceivers and makes it basically sane. The mess we run into after this try/catch is terrifying so I'm avoiding actually getting rid of any of it quite yet. Ref T1205.

Test Plan: Added a bit of test coverage. Used Receiver test console to verify some additional behaviors.

Reviewers: btrahan

Reviewed By: btrahan

CC: Afaque_Hussain, aran

Maniphest Tasks: T1205

Differential Revision: https://secure.phabricator.com/D5931
Fixed a bug in Image Macros where the image URL was wrong

Summary: Image URLs were accidentally inaccurate due to the macro ID being overwritten by the file ID when searching for users

Test Plan: Visited the macro page and searched for my own macros. They are now clickable.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3193

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