@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.

Move Recaptcha config to PHP

Summary: Bring these over. Also sort the group list.

Test Plan: Viewed config.

Reviewers: btrahan, codeblock, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2255

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

+42
+2
src/__phutil_library_map__.php
··· 1062 1062 'PhabricatorPropertyListExample' => 'applications/uiexample/examples/PhabricatorPropertyListExample.php', 1063 1063 'PhabricatorPropertyListView' => 'view/layout/PhabricatorPropertyListView.php', 1064 1064 'PhabricatorQuery' => 'infrastructure/query/PhabricatorQuery.php', 1065 + 'PhabricatorRecaptchaConfigOptions' => 'applications/config/option/PhabricatorRecaptchaConfigOptions.php', 1065 1066 'PhabricatorRedirectController' => 'applications/base/controller/PhabricatorRedirectController.php', 1066 1067 'PhabricatorRefreshCSRFController' => 'applications/auth/controller/PhabricatorRefreshCSRFController.php', 1067 1068 'PhabricatorRemarkupControl' => 'view/form/control/PhabricatorRemarkupControl.php', ··· 2380 2381 'PhabricatorProjectUpdateController' => 'PhabricatorProjectController', 2381 2382 'PhabricatorPropertyListExample' => 'PhabricatorUIExample', 2382 2383 'PhabricatorPropertyListView' => 'AphrontView', 2384 + 'PhabricatorRecaptchaConfigOptions' => 'PhabricatorApplicationConfigOptions', 2383 2385 'PhabricatorRedirectController' => 'PhabricatorController', 2384 2386 'PhabricatorRefreshCSRFController' => 'PhabricatorAuthController', 2385 2387 'PhabricatorRemarkupControl' => 'AphrontFormTextAreaControl',
+1
src/applications/config/controller/PhabricatorConfigListController.php
··· 46 46 assert_instances_of($groups, 'PhabricatorApplicationConfigOptions'); 47 47 48 48 $list = new PhabricatorObjectItemListView(); 49 + $groups = msort($groups, 'getName'); 49 50 foreach ($groups as $group) { 50 51 $item = id(new PhabricatorObjectItemView()) 51 52 ->setHeader($group->getName())
+39
src/applications/config/option/PhabricatorRecaptchaConfigOptions.php
··· 1 + <?php 2 + 3 + final class PhabricatorRecaptchaConfigOptions 4 + extends PhabricatorApplicationConfigOptions { 5 + 6 + public function getName() { 7 + return pht("Integration with Recaptcha"); 8 + } 9 + 10 + public function getDescription() { 11 + return pht("Configure Recaptcha captchas."); 12 + } 13 + 14 + public function getOptions() { 15 + 16 + return array( 17 + $this->newOption('recaptcha.enabled', 'bool', false) 18 + ->setOptions( 19 + array( 20 + pht("Disable Recaptcha"), 21 + pht("Enable Recaptcha"), 22 + )) 23 + ->setSummary(pht('Enable captchas with Recaptcha.')) 24 + ->setDescription( 25 + pht( 26 + "Enable recaptcha to require users solve captchas after a few ". 27 + "failed login attempts. This hinders brute-force attacks against ". 28 + "user passwords. For more information, see http://recaptcha.net/")), 29 + $this->newOption('recaptcha.public-key', 'string', null) 30 + ->setDescription( 31 + pht('Recaptcha public key, obtained by signing up for Recaptcha.')), 32 + $this->newOption('recaptcha.private-key', 'string', null) 33 + ->setMasked(true) 34 + ->setDescription( 35 + pht('Recaptcha private key, obtained by signing up for Recaptcha.')), 36 + ); 37 + } 38 + 39 + }