Fix file upload redirect URI

Summary: Ref T2625. This is now "query" instead of "filter" with the new search stuff.

Test Plan: Uploaded a file. Grepped for 'file/filter'.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2625

Differential Revision: https://secure.phabricator.com/D6105
Conpherence - add an updatethread conduit method

Summary: Last of the methods. Fixes T3166.

Test Plan: updated a thread in all the various ways except remove and it worked. removed myself and it worked! tried to remove someone else and it yelled at me.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T3166

Differential Revision: https://secure.phabricator.com/D6103
Conpherence - tweak calendar widget

Summary: this does a few things. Fixes T3253. Including the Sunday -> Saturday list view part. Cleans up the display when there are no events, getting rid of this spacer thing. Also fixes Calendar CSS for device-tablet where we had a 2px gap on the calendar from the header.

Test Plan: played with calendar widget a bunch

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T3253

Differential Revision: https://secure.phabricator.com/D6102
Separate Phriction style into PHUIDocumentView

Summary:
Ref T988. Fixes T3150. I want to use this element in Diviner, so separate it from Phriction.

This makes no changes to the actual display except for fixing {T3150} by adding `overflow: hidden;`.

Test Plan: Viewed Phriction documents in mobile and desktop views.

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988, T3150

Differential Revision: https://secure.phabricator.com/D6101
Add an Atom controller to Diviner

Summary: Ref T988. Lots of rough edges still, but this pulls the right data and dumps it into a reasonable-looking shell.

Test Plan: {F44883}

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6104
Remove unused conpherence js rules

Summary: I missed removing these today.

Test Plan: Pontificate

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6106
Add Content-Length header to Aphront file responses.

Summary:
Provide a Content-Length header so that browsers can estimate time
remaining for file downloads.

Test Plan: Tested on our local phabricator install.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6107
Conpherence - fix off by one bug in calendar data fetching

Summary: Ref T3155. "last sunday" is "last sunday at 00:00" so you have to include a day for Sunday itself.

Test Plan: calendar renders correctly today - saturday - which is the edge case of this

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T3155

Differential Revision: https://secure.phabricator.com/D6108
Fix Phriction preview

Summary: Missed this in the PHUIDocumentView thing.

Test Plan: Previewed a Phriction edit; grepped more/harder.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6110
Make PhabricatorObjectItemListView extend AphrontTagView

Summary: Provide all the setSigil() / setID() sorts of calls. No functional changes.

Test Plan: Viewed object item lists.

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6112
Conpherence - fix calendar bugs part deux

Summary: I needed to port my extremely clever "last sunday as of tomorrow" trick to the display layer. Also found a fun bug in testing where +N days was changing it to 1:00 AM from 00:00 AM with my timezone configuration. Presumably all sorts of whacky hyjinx ensue when you modify DateTime and you need to re-specify the timezone after to get it to work

Test Plan: verified that Today, SUNDAY, we see TODAY -> Saturday and it all looks good. Verified midnite -> just before midnight status events span but a single day.

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6114
Consolidate some datetime code and add unit tests

Summary: See D6115.

Test Plan:
  - Ran unit tests.
  - Viewed reports.
  - Created a countdown.
  - Searched chatlog.
  - Searched pastes by created date.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6116
Fixed Pholio stories in feed.

Summary: Pholio stories now reference the mock they're talking about.

Test Plan: Generate each type of story and check that they make sense in feed/inline.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, AnhNhan

Maniphest Tasks: T2988

Differential Revision: https://secure.phabricator.com/D6117
Allow `AphrontTagView` subclasses to wrap their tag in a container

Summary: See Conpherence discussion. This probably works?

Test Plan:
Didn't test at all!

bwahaha

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6120
Conpherence - implement epoch creation slightly differently

Summary: D6114 fixed some bugs but on production it shows up as a new bug where Saturday is the first day? stop messing with the DateTime object so much and do some old school epoch manipulation. This works correctly on my laptop and my still fail in production, but it will rule out DateTime suckage.

Test Plan: still works on laptop

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D6115
Prompt to adding a project if none in Maniphest

Summary: Adds 'Add Project...' if no projects present on Maniphest items. Also - I can't seem to get a dialog to pop, what am I missing? Fixes T3308

Test Plan: Click add project, get edit form.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3308

Differential Revision: https://secure.phabricator.com/D6121
Add a book controller and various amenities to Diviner's live view

Summary: Ref T988. Mostly backend changes, with a very rough frontend on top of them. See Conpherence discussion.

Test Plan: {F45010}

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T988

Differential Revision: https://secure.phabricator.com/D6113
Fix some Phabricator lint warnings

Summary: Lint.

Test Plan: Lint.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6127
Mostly generalize Maniphest's drag-and-drop list

Summary:
I want to use draggable lists in at least three other interfaces:

  - (Today) Reorganizing named search queries.
  - (Today) Reorganizing custom fields.
  - (Future) Dragging tasks around on boards.

This mostly generalizes the drag-and-drop code in Maniphest's task list. It isn't a total generalization and will need some more tweaking (for example, Maniphest's list is unusual in that the user can't drag items to the top of the list), but it substantially separates the Maniphest-specific behaviors from the general dragging behaviors.

This diff causes no functional changes.

Test Plan: Dragged and dropped tasks in Maniphest.

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D6124
Allow builtin named queries to be disabled

Summary:
Applications come with builtin queries, but users might want to get rid of them. Allow users to disable named queries if they prefer.

This has one funky behavior, which is that the first time you disable a named query it goes to the top of your list. That will be fixed in the next diff, which will make them reorderable.

Test Plan: Added/edited/removed named queries, disabled/enabled builtin named queries.

Reviewers: chad

Reviewed By: chad

CC: aran

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