Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRM-21826: Update System Checks to separate links to Domain Address … #11756

Merged
merged 1 commit into from
Mar 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions CRM/Utils/Check/Component/Env.php
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,19 @@ public function checkDomainNameEmail() {
$messages = array();

list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail(TRUE);
$domain = CRM_Core_BAO_Domain::getDomain();
$domainName = $domain->name;
$fixEmailUrl = CRM_Utils_System::url("civicrm/admin/domain", "action=update&reset=1");
$domain = CRM_Core_BAO_Domain::getDomain();
$domainName = $domain->name;
$fixEmailUrl = CRM_Utils_System::url("civicrm/admin/options/from_email_address", "&reset=1");
$fixDomainName = CRM_Utils_System::url("civicrm/admin/domain", "action=update&reset=1");

if (!$domainEmailAddress || $domainEmailAddress == 'info@EXAMPLE.ORG') {
if (!$domainName || $domainName == 'Default Domain Name') {
$msg = ts("Please enter your organization's <a href=\"%1\">name, primary address, and default FROM Email Address</a> (for system-generated emails).",
array(1 => $fixEmailUrl));
$msg = ts("Please enter your organization's <a href=\"%1\">name, primary address </a> and <a href=\"%2\">default FROM Email Address </a> (for system-generated emails).",
array(
1 => $fixDomainName,
2 => $fixEmailUrl,
)
);
}
else {
$msg = ts('Please enter a <a href="%1">default FROM Email Address</a> (for system-generated emails).',
Expand All @@ -224,7 +229,7 @@ public function checkDomainNameEmail() {
}
elseif (!$domainName || $domainName == 'Default Domain Name') {
$msg = ts("Please enter your organization's <a href=\"%1\">name and primary address</a>.",
array(1 => $fixEmailUrl));
array(1 => $fixDomainName));
}

if (!empty($msg)) {
Expand Down