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