mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-09 16:32:39 +01:00
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
This commit is contained in:
parent
baf2ea5b32
commit
00bf47f973
6 changed files with 7 additions and 23 deletions
|
@ -515,10 +515,6 @@ return array(
|
|||
// address will be stored in an 'From Email' field on the task.
|
||||
'metamta.maniphest.default-public-author' => null,
|
||||
|
||||
// You can disable the Herald hints in email if users prefer smaller messages.
|
||||
// These are the links under the headers "MANAGE HERALD RULES" and
|
||||
// "WHY DID I GET THIS EMAIL?". If you set this to true, they will not appear
|
||||
// in any mail. Users can still navigate to the links via the web interface.
|
||||
'metamta.herald.show-hints' => true,
|
||||
|
||||
// You can disable the hints under "REPLY HANDLER ACTIONS" if users prefer
|
||||
|
|
|
@ -72,9 +72,9 @@ EODOC
|
|||
|
||||
$herald_hints_description = $this->deformat(pht(<<<EODOC
|
||||
You can disable the Herald hints in email if users prefer smaller messages.
|
||||
These are the links under the headers "MANAGE HERALD RULES" and "WHY DID I GET
|
||||
THIS EMAIL?". If you set this to true, they will not appear in any mail. Users
|
||||
can still navigate to the links via the web interface.
|
||||
These are the links under the header "WHY DID I GET THIS EMAIL?". If you set
|
||||
this to true, they will not appear in any mail. Users can still navigate to
|
||||
the links via the web interface.
|
||||
EODOC
|
||||
));
|
||||
|
||||
|
|
|
@ -278,9 +278,8 @@ abstract class DifferentialMail extends PhabricatorMail {
|
|||
$body->addReplySection($reply_handler->getReplyHandlerInstructions());
|
||||
|
||||
if ($this->getHeraldTranscriptURI() && $this->isFirstMailToRecipients()) {
|
||||
$manage_uri = '/herald/view/differential/';
|
||||
$xscript_uri = $this->getHeraldTranscriptURI();
|
||||
$body->addHeraldSection($manage_uri, $xscript_uri);
|
||||
$body->addHeraldSection($xscript_uri);
|
||||
}
|
||||
|
||||
return $body->render();
|
||||
|
|
|
@ -50,19 +50,15 @@ final class PhabricatorMetaMTAMailBody {
|
|||
/**
|
||||
* Add a Herald section with a rule management URI and a transcript URI.
|
||||
*
|
||||
* @param string URI to rule management.
|
||||
* @param string URI to rule transcripts.
|
||||
* @return this
|
||||
* @task compose
|
||||
*/
|
||||
public function addHeraldSection($rules_uri, $xscript_uri) {
|
||||
public function addHeraldSection($xscript_uri) {
|
||||
if (!PhabricatorEnv::getEnvConfig('metamta.herald.show-hints')) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$this->addTextSection(
|
||||
pht('MANAGE HERALD RULES'),
|
||||
PhabricatorEnv::getProductionURI($rules_uri));
|
||||
$this->addTextSection(
|
||||
pht('WHY DID I GET THIS EMAIL?'),
|
||||
PhabricatorEnv::getProductionURI($xscript_uri));
|
||||
|
|
|
@ -14,9 +14,6 @@ HEADER
|
|||
bass
|
||||
trout
|
||||
|
||||
MANAGE HERALD RULES
|
||||
http://test.com/rules/
|
||||
|
||||
WHY DID I GET THIS EMAIL?
|
||||
http://test.com/xscript/
|
||||
|
||||
|
@ -54,9 +51,6 @@ HEADER
|
|||
bass
|
||||
trout
|
||||
|
||||
MANAGE HERALD RULES
|
||||
http://test.com/rules/
|
||||
|
||||
WHY DID I GET THIS EMAIL?
|
||||
http://test.com/xscript/
|
||||
|
||||
|
@ -74,7 +68,7 @@ EOTEXT;
|
|||
$body = new PhabricatorMetaMTAMailBody();
|
||||
$body->addRawSection("salmon");
|
||||
$body->addTextSection("HEADER", "bass\ntrout\n");
|
||||
$body->addHeraldSection("/rules/", "/xscript/");
|
||||
$body->addHeraldSection("/xscript/");
|
||||
$body->addReplySection("pike");
|
||||
|
||||
$this->assertEqual($expect, $body->render());
|
||||
|
|
|
@ -119,7 +119,6 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
|||
|
||||
$xscript_id = $xscript->getID();
|
||||
|
||||
$manage_uri = '/herald/view/commits/';
|
||||
$why_uri = '/herald/transcript/'.$xscript_id.'/';
|
||||
|
||||
$reply_handler = PhabricatorAuditCommentEditor::newReplyHandlerForCommit(
|
||||
|
@ -135,7 +134,7 @@ final class PhabricatorRepositoryCommitHeraldWorker
|
|||
$body->addTextSection(pht('DIFFERENTIAL REVISION'), $differential);
|
||||
$body->addTextSection(pht('AFFECTED FILES'), $files);
|
||||
$body->addReplySection($reply_handler->getReplyHandlerInstructions());
|
||||
$body->addHeraldSection($manage_uri, $why_uri);
|
||||
$body->addHeraldSection($why_uri);
|
||||
$body->addRawSection($inline_patch_text);
|
||||
$body = $body->render();
|
||||
|
||||
|
|
Loading…
Reference in a new issue