Add support for S3 endpoint regions.

Summary:
Allows to use file storage in different Amazon S3 regions as well as it
should support different file storage services with S3 compliant API
(eg.: Bashos' Riak CS).

Test Plan:
1. Create S3 bucket in non-default AWS Region (e.g. EU/Ireland).
2. Set appropriate bucket policy to allow upload & download objects for the specified access credentials.
3. Set `amazon-s3.endpoint` in your configuration file to an appropriate value (e.g. `s3-eu-west-1.amazonaws.com` for EU region).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3965
fix mail handling error -- return empty array if we have no $addresses

Test Plan: pushing it live to test
update documentation for storage changes w/ .php files

Summary: no schema changes allowed in the .php files

Test Plan: viewed doc -- looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2059

Differential Revision: https://secure.phabricator.com/D3966
Fix several migration issues with the Task/Counter patch

Summary:
People hit three issues with D3914:

  - As per T2059, we applied a schema change from a `.php` patch, which currently does not work if you use a different user to make schema changes than for normal use.
    - Since the change in question is idempotent, just move it to a `.sql` patch. We'll follow up in T2059 and fix it properly.
  - Rogue daemons at several installs used old code (expecting autoincrement) to insert into the new table (no autoincrement), thereby creating tasks with ID 0.
    - Rename the table so they'll fail.
    - This also makes the code a little more consistent.
  - Some installs now have tasks with ID 0.
    - Use checks against null rather than against 0 so we can process these tasks.

The major issues this fixes are the schema upgrade failure in T2059, and the infinite loops in T2072 and elsewhere.

This isn't really a fully statisfactory fix. I'll discuss some next steps in T2072.

Test Plan: Created new tasks via MetaMTA/Differential. Ran tasks with `phd debug taskmaster`. Inserted a task 0 and verified it ran and archived correctly.

Reviewers: btrahan, vrana, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2072, T2059

Differential Revision: https://secure.phabricator.com/D3973
Make default button text size 13px.

Summary: Makes buttons look 13px by default, 11 px small.

Test Plan: http://phab1.pushlabs.net/uiexample/view/PhabricatorButtonsExample/

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2078

Differential Revision: https://secure.phabricator.com/D3972
Differential - add unit and lint information to diff view

Summary:
see title. Note that fields that use customs storage don't work because I didn't think it made sense to load a revision object to get that data. Further, we don't have a revision id at some points, so its not clear what does / does not work...?

Also added a link to upsell this diff view as I had trouble finding it.

Test Plan: viewed some diffs

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2026

Differential Revision: https://secure.phabricator.com/D3962
Simplify and optimize save_lint.php

Test Plan: Ran it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3933
Fix Diffusion lint counts under SVN

Summary: Also remove some columns.

Test Plan: Looked at SVN dir in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vsuba

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3949
<LDAP: If available use DN from previously retrieved user>

Summary:
When searching for a user before logging in use the DN from the retrived user.
This allows you to use a less fine grained DN when searching for a user. For example dc=domain,dc=domain instead of ou=unit,dc=domain,dc=com.

Test Plan: Tested on local install with ldap.search-first disabled and enabled.

Reviewers: epriestley, yunake

Reviewed By: epriestley

CC: auduny, briancline, aran, Korvin, vsuba

Differential Revision: https://secure.phabricator.com/D3549
Fix fatal in browse file if `lintCommit` is invalid

Test Plan: Set `lintCommit` to 'x' and browsed a file.

Reviewers: nh, epriestley

Reviewed By: nh

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3976
fix unit test data showing up in diff view

Summary: I am an idiot. :(  D3962 added the full set of properties and I derp'ed this part of the diff up

Test Plan: ask lesliepc16 to take a look

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: lesliepc16, aran, Korvin

Maniphest Tasks: T2091

Differential Revision: https://secure.phabricator.com/D3984
fix lightbox for when we have no $user or $request

Summary: defensive program wins all battles

Test Plan: lightbox still worked

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3975
fix feed story publishing for audit comments

Summary: we need to make sure we should publish to the auditor in a given audit request. write some custom logic for this as it is subtly different than other things like CC.

Test Plan: repro from T2087 produced expected results. further, former auditors who resigned did not get feed stories published.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2087

Differential Revision: https://secure.phabricator.com/D3987
Document a policy about fishing expeditions

Summary:
Tighten the Phabricator support policy from "we will help with literally anything for free" to "we will help with anything for free, except unreproducible fishing expeditions".

This is not the right policy in the long term (in some form, I expect the level of free support will decrease, and, e.g., I won't be offering to drive to your place and fix your stuff), but this class of issue is by far the worst and most pressing and I want to stop dealing with fishing expeditions like this one right now, since I hate supporting them and they're a disproportionately huge waste of time:

  https://github.com/facebook/phabricator/issues/233

We had a similar case over the weekend on Facebook:

  (... snip many messages ...)
  Adam Aahil
  :(
  need your help bro i have to also setup on live server as well
  still trying ...
  not success
  after doing this my local apache is not restarting ..

  Adam Aahil
  when u get time plz let me know

Write a friendly explanation of why these support cases aren't a priority and how to build repro cases.

If this looks good, I plan to respond to anything that I can't reproduce in a few minutes with a link to this.

Test Plan: {F24759}

Reviewers: btrahan, chad

Reviewed By: chad

CC: vrana, aran

Differential Revision: https://secure.phabricator.com/D3981
Add a detail view for resources in Drydock

Summary: Nothing fancy here, just add a detail page.

Test Plan:
Looked at detail page.

{F24808}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3995
be careful of received mail object in error cases too

Summary:
we're tracking down a fatal caused by the mandatory
attachments array parameter change in the reply handler and
yo dawg, heard you like to fatal in your fatal.

Test Plan:
internal test scenario with xmail -> phabricator
triggered manually.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D4005
Improve PhabricatorPropertyListView and add section headers

Summary:
  - For Drydock, I want to add section headers to separate user-defined attributes from global attributes.
  - Some day for Differential, I want to add "Summary" and "Test Plan" section headers.
  - Clean up some stuff a bit; drop the multiple APIs for setting text content. Explicitly disallow appendChild().
  - Build out the UIExample a bit.

Test Plan:
{F24821}

{F24822}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D4000
Update static resource packages

Summary: These are a bit out of date; bundle things together better.

Test Plan: Viewed page source for home, differential list, differential diff, maniphest list, maniphest task. Verified reasonable resource packaging.

Reviewers: chad, vrana, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4002
Modify Celerity to emit required resources on Ajax responses

Summary: Companion diff to D4003.

Test Plan: Rigged up a response which loaded a CSS file with `body { background: red; }`, verified page turned red after I clicked the button.

Reviewers: vrana, chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2086

Differential Revision: https://secure.phabricator.com/D4004
Fix markup in docs

Summary: We highligh ##``## only on the same line.

Test Plan: Looked at it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

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