Returning simple text error message instead of HTML for requests where HTML won't be rendered for the user. Fixes T2401.

Summary: If the check is too much, let me know. I noticed you send over __ajax__=true, so I figured it was safest to evaluate existance and value.

Test Plan: Included unit test. Would have included a test where __ajax__ and __conduit__ are not set, but without mocking this gives an uncatchable Fatal Error. If you want me to include it, just direct me on the mocking strategy.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2401

Differential Revision: https://secure.phabricator.com/D4719
Code Refactored

Summary: Code Refactored as suggested by epriestley

Test Plan: Same test plan as of Installation & Uninstallation of Applications

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4740
Respected canUninstall() :P

Summary: Disabled uninstalling of applications which can't be uninstalled. Also, applications which cannot be uninstalled always show that they are installed even if users somehow manually edit the configuration.

Test Plan: Manually edited the URI to uninstall applications which can't be unisntalled.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4741
Always render comment panel in Diffusion commit view

Summary: I'm going to stop showing changes for commits which touch 30,000 files, but still want to show the comment panel.

Test Plan: Looked at commits, saw comments. Mashed "Z"; haunted mode worked.

Reviewers: nh, vrana

Reviewed By: nh

CC: aran

Differential Revision: https://secure.phabricator.com/D4729
Don't show changes for commits which affect more than 1,000 files

Summary: @nh, does this do something reasonable on merges? We can refine the behavior ('click to show all 92 million files'), but I want to make sure it's at least feasible before we pursue it.

Test Plan: Set 1000 to "3" and looked at a change which touched 6 files.

Reviewers: nh, vrana, zjwsoft

Reviewed By: nh

CC: aran

Differential Revision: https://secure.phabricator.com/D4730
Partially revert marking of copies as direct

Summary:
The other `true` is correct (and I think we can fix the scaling issues) but this one should be an indirect change. This prevents the branch from appearing in the history of every file.

(I misread this code and gave @vrana some bad advice originally. This is //actually// consistent with Mercurial and Git.)

Test Plan: Partial revert. I'll make this stuff testable.

Reviewers: nh, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4742
Disabled Uninstall state for essential applications

Summary: Disabled Uninstall state for essential applications of Phabricator. Information provided why they cannot uninstall these applications. Also take care of users trying to install an application which cannot be uninstalled by editing the URI.

Test Plan: Manually tested

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4743
differential now displays date created and date modified info

Summary: Added date created and date modified to diff

Test Plan: Creat a new diff. Check to see that dateCreated and dateModified appear

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4756
More information on Applications

Summary: More Information on Applications on Applications List View. Also, added tags in Applications Details view to show their status.

Test Plan: Manual Checking

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4759
Making Applications application appear in the Launch View

Summary: Applications application now appears in the launch view under Admin group

Test Plan: Manual

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4760
Port javelin_tag() to master

Summary: I want to make FB code forwards compatible.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4766
Use PhutilNumber in translations

Summary: It's a little bit confusing that you couldn't use %d but kind of expected taken that the number will be formatted so it's not a number anymore.

Test Plan: /paste/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4764
Make multiple tags render more nicely in headers

Summary: If you render multiple tags, they squish together.

Test Plan:
Now they look a little better:

{F31191}

Reviewers: Afaque_Hussain

Reviewed By: Afaque_Hussain

CC: aran

Differential Revision: https://secure.phabricator.com/D4761
Minor improvements to Applications application

Summary:
I missed these in review, but here are a couple of tweaks:

  - Call `setWorkflow(true)` on the actions. This makes the dialogs pop up on the same page with Javascript if it's available.
  - When the user installs/uninstalls an application, send them back to the application's detail page, not the application list.

Test Plan:
  - Uninstalled an application (saw dialog, got sent back to detail page).
  - Installed an application (saw dialog, got sent back to detail page).
  - Canceled an application uninstall.

Reviewers: Afaque_Hussain

Reviewed By: Afaque_Hussain

CC: aran

Differential Revision: https://secure.phabricator.com/D4762
Impact Font Used If Available

Summary: Fixed T2395

Test Plan: When impact.ttf was added to resources/font, it was being used. When renamed, tuffy was.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2395

Differential Revision: https://secure.phabricator.com/D4700
Improve meme text outlining

Summary: Fixed T2398

Test Plan: Ran a local test. It looked a tad better.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2398

Differential Revision: https://secure.phabricator.com/D4779
Add isNormalMouseEvent() to Javelin

Summary:
Added isNormalMouseEvent() that returns true if left mouse button triggered event click, mousedown or mouseup.
Modified isNormalMouseClick() to use new function.

Test Plan: Verified that new function works for click, mousedown and mouseup events.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2475

Differential Revision: https://secure.phabricator.com/D4778
Refactor developer options to specific developer-mode option.

Summary: Refactor options related to verbose error reporting and forcing disk reads into a single developer option.

Test Plan: Run Phabricator with the developer-mode option set and check that errors print stack traces, static assets are always reloaded, etc.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4780
Minor, unbreak the world.
Stabilize scroll position as diffs load

Summary:
Try to lock the screen to whatever the user is looking at as we load changesets.

Notably, this improves the use case of taking a known action on a diff. Currently, you have to wait for everything to load or the comments keep getting scrolled down. After this change, the comments stay in the same place on screen.

Test Plan:
Raised the autoload changeset limit from 100 to 1000, looked at a 220 changeset diff.

  - Reloaded it while scrolled at the top; normal behavior (no scrolling).
  - Reloaded it, scrolled to the bottom. Comment area now stable.
  - Reloaded it, kind of scrolled around the middle? Behavior seemed stable/reasonable. This one is kind of heursitic so it's hard to say I'm getting it totally right or not, but it's less important than the "bottom" case.

Reviewers: vrana, btrahan, chad, dctrwatson

Reviewed By: btrahan

CC: aran

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