Recheck if revision hasn't been already closed in commit parser

Summary:
If attaching a commit or checking if there are any changes takes nonzero time then the revision may be closed by someone else.

Cleaner solution would be to do it inside a transaction and mark the SELECT as FOR UPDATE but it would be blocking.

Test Plan: Patched `$should_close` to be true, reparsed an already closed commit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3555
use available api to check daemon status

Summary:
Replace executing 'ps aux' with usage of available api to
control daemons PhabricatorDaemonControl.

This fixes isPullDaemonRunningOnThisMachine returning wrong status
under Fedora & lighttpd & SELinux because SELinux with default
settings blocked getting all processes in 'ps aux'.

Test Plan: start stop daemon and check repository app

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3557
Fix $_SERVER['CONTENT_TYPE'] trigger a NOTICE error

See T1762.

Reviewed by: epriestley
Merge pull request #207 from vvavrychuk/daemon

use available api to check daemon status
document running phabricator on builtin PHP webserver

Summary: This is based on info from https://github.com/facebook/phabricator/pull/165

Test Plan: View configuration guide

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3467
Aphlict should respect the PATH set in the config.

Reviewed by: epriestley
Fix whitespace in Package e-mail

Test Plan: Changed package, verified e-mail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3559
Allow custom request checker prior to displaying page

Summary: We want to allow a broader access to our installation but we need to check the request in that case.

Test Plan:
Created a simple `PhabricatorRequestChecker` returning a custom controller.
Verified that this controller is used when accessing any page.
Returned `null` from this checker and verified that all 209 Phabricator pages are accessible.

Reviewers: epriestley

Reviewed By: epriestley

CC: scottmac, aran, Korvin, btrahan

Differential Revision: https://secure.phabricator.com/D2488
Add option to symbol import script to ignore errors in input

Summary:
I was running the generate_ctags_symbols script on a project, and some
combination of this script and ctags was generating invalid rows for this
script. It's nice if this script can ignore invalid input instead of having
to add another step to filter out invalid input.

Test Plan: run script with input that has some invalid lines

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3532
Fix fatal with some pastes

Summary: Avoid a BadMethodCallException for some pastes

Test Plan: Call up a paste from a day or so ago (in the FB environment)

Reviewers: nh, vrana

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3560
Phame - allow blogs to specify custom URIs

Summary: this then enables people to create blog.theircompany.com. And for us, blog.phacility.com...!

Test Plan:
 - created custom URIs of various goodness and verified the error messages were sensical.
 - verified if "false" in configuration then custom uri stuff disappears

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3542
Make "public" pastes meaningfully visible to logged-out users

Summary:
  - Introduce `shouldAllowPublic()`, indicating that logged-out users are OK in a controller if the install is configured to permit public policies.
  - Make Paste views and lists allow public users.
  - Make UI do sensible things with respect to disabling links, etc.
  - Improve behavior of "you need to login" with respect to policy exceptions and Ajax requests.

Test Plan: Looked at "public" paste, saw all unavailable UI disabled, clicked it, got appropraite prompts.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3502
Use responsive UI elements in Ponder list views

Summary:
Use the new `PhabricatorObjectItemListView` in Ponder so it works with the new UI. It will also get some features like flags "for free" in the future.

This removes the pager; I'll restore it in the next diff.

Test Plan: Looked at feed.

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran, chad

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3507
Make pastes inherit visibility from their parent

Summary: good title

Test Plan: set a paste visibility to administrator then forked it. noted new paste had administrators selected. saved it and verified administrators was the value.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1833

Differential Revision: https://secure.phabricator.com/D3570
Use responsive form elements in Ponder create view

Summary: Use flexible form and application side nav.

Test Plan: {F19525}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3511
Separate "your questions" from "your answers"

Summary: The aoff/qoff thing is pretty awkward and putting these both on the same page is probably only at all useful when looking at someone else's questions/answers -- we should just pursue main profile integration for that.

Test Plan: {F19529}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3512
Restore pager to Your Questions and All Questions

Summary: Restore the pager, using `executeWithOffsetPager()` to handle slicing, etc. Simplify and generalize `PonderQuestionQuery`.

Test Plan:
Set page size to 1, used pager to page.

{F19531}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3513
Remove PonderQuestionFeedView

Summary: No use sites left after D3513.

Test Plan: `grep`

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3515
Use responsive elements for Ponder "add answer" view

Summary: Side nav, plus "add answer".

Test Plan: {F19533}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

Differential Revision: https://secure.phabricator.com/D3516
Simplify upvote/downvote implementation

Summary:
Use sigils to simplify the vote implementation and move most rendering to the server.

Use unicode glyphs in place of graphics.

Test Plan: {F19539}

Reviewers: pieter, starruler

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1644

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