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

Fix "Manage herald rules" link by removing it

Summary: Fixes T4001. I broke this some time ago and no one has complained. I don't think it gets much use, and we haven't added it for the newer apps. Just get rid of it rather than adapt the URIs for ApplicationSearch.

Test Plan: Unit tests, sent myself some email.

Reviewers: zeeg, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4001

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

+7 -23
-4
conf/default.conf.php
··· 515 515 // address will be stored in an 'From Email' field on the task. 516 516 'metamta.maniphest.default-public-author' => null, 517 517 518 - // You can disable the Herald hints in email if users prefer smaller messages. 519 - // These are the links under the headers "MANAGE HERALD RULES" and 520 - // "WHY DID I GET THIS EMAIL?". If you set this to true, they will not appear 521 - // in any mail. Users can still navigate to the links via the web interface. 522 518 'metamta.herald.show-hints' => true, 523 519 524 520 // You can disable the hints under "REPLY HANDLER ACTIONS" if users prefer
+3 -3
src/applications/config/option/PhabricatorMetaMTAConfigOptions.php
··· 72 72 73 73 $herald_hints_description = $this->deformat(pht(<<<EODOC 74 74 You can disable the Herald hints in email if users prefer smaller messages. 75 - These are the links under the headers "MANAGE HERALD RULES" and "WHY DID I GET 76 - THIS EMAIL?". If you set this to true, they will not appear in any mail. Users 77 - can still navigate to the links via the web interface. 75 + These are the links under the header "WHY DID I GET THIS EMAIL?". If you set 76 + this to true, they will not appear in any mail. Users can still navigate to 77 + the links via the web interface. 78 78 EODOC 79 79 )); 80 80
+1 -2
src/applications/differential/mail/DifferentialMail.php
··· 278 278 $body->addReplySection($reply_handler->getReplyHandlerInstructions()); 279 279 280 280 if ($this->getHeraldTranscriptURI() && $this->isFirstMailToRecipients()) { 281 - $manage_uri = '/herald/view/differential/'; 282 281 $xscript_uri = $this->getHeraldTranscriptURI(); 283 - $body->addHeraldSection($manage_uri, $xscript_uri); 282 + $body->addHeraldSection($xscript_uri); 284 283 } 285 284 286 285 return $body->render();
+1 -5
src/applications/metamta/view/PhabricatorMetaMTAMailBody.php
··· 50 50 /** 51 51 * Add a Herald section with a rule management URI and a transcript URI. 52 52 * 53 - * @param string URI to rule management. 54 53 * @param string URI to rule transcripts. 55 54 * @return this 56 55 * @task compose 57 56 */ 58 - public function addHeraldSection($rules_uri, $xscript_uri) { 57 + public function addHeraldSection($xscript_uri) { 59 58 if (!PhabricatorEnv::getEnvConfig('metamta.herald.show-hints')) { 60 59 return $this; 61 60 } 62 61 63 - $this->addTextSection( 64 - pht('MANAGE HERALD RULES'), 65 - PhabricatorEnv::getProductionURI($rules_uri)); 66 62 $this->addTextSection( 67 63 pht('WHY DID I GET THIS EMAIL?'), 68 64 PhabricatorEnv::getProductionURI($xscript_uri));
+1 -7
src/applications/metamta/view/__tests__/PhabricatorMetaMTAMailBodyTestCase.php
··· 14 14 bass 15 15 trout 16 16 17 - MANAGE HERALD RULES 18 - http://test.com/rules/ 19 - 20 17 WHY DID I GET THIS EMAIL? 21 18 http://test.com/xscript/ 22 19 ··· 54 51 bass 55 52 trout 56 53 57 - MANAGE HERALD RULES 58 - http://test.com/rules/ 59 - 60 54 WHY DID I GET THIS EMAIL? 61 55 http://test.com/xscript/ 62 56 ··· 74 68 $body = new PhabricatorMetaMTAMailBody(); 75 69 $body->addRawSection("salmon"); 76 70 $body->addTextSection("HEADER", "bass\ntrout\n"); 77 - $body->addHeraldSection("/rules/", "/xscript/"); 71 + $body->addHeraldSection("/xscript/"); 78 72 $body->addReplySection("pike"); 79 73 80 74 $this->assertEqual($expect, $body->render());
+1 -2
src/applications/repository/worker/PhabricatorRepositoryCommitHeraldWorker.php
··· 119 119 120 120 $xscript_id = $xscript->getID(); 121 121 122 - $manage_uri = '/herald/view/commits/'; 123 122 $why_uri = '/herald/transcript/'.$xscript_id.'/'; 124 123 125 124 $reply_handler = PhabricatorAuditCommentEditor::newReplyHandlerForCommit( ··· 135 134 $body->addTextSection(pht('DIFFERENTIAL REVISION'), $differential); 136 135 $body->addTextSection(pht('AFFECTED FILES'), $files); 137 136 $body->addReplySection($reply_handler->getReplyHandlerInstructions()); 138 - $body->addHeraldSection($manage_uri, $why_uri); 137 + $body->addHeraldSection($why_uri); 139 138 $body->addRawSection($inline_patch_text); 140 139 $body = $body->render(); 141 140