@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Show "Login to Answer" in Ponder if viewer is logged out

Summary: Fixes T9278. Logged out viewers shouldn't see a form field to answer, just a login button.

Test Plan: Log out, go to question, click Login to Answer, login, get redirected back.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T9278

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

+12
+12
src/applications/ponder/view/PonderAddAnswerView.php
··· 90 90 id(new AphrontFormSubmitControl()) 91 91 ->setValue(pht('Add Answer'))); 92 92 93 + if (!$viewer->isLoggedIn()) { 94 + $login_href = id(new PhutilURI('/auth/start/')) 95 + ->setQueryParam('next', '/Q'.$question->getID()); 96 + $form = id(new PHUIFormLayoutView()) 97 + ->addClass('login-to-participate') 98 + ->appendChild( 99 + id(new PHUIButtonView()) 100 + ->setTag('a') 101 + ->setText(pht('Login to Answer')) 102 + ->setHref((string)$login_href)); 103 + } 104 + 93 105 $box = id(new PHUIObjectBoxView()) 94 106 ->setHeader($header) 95 107 ->appendChild($form);