ts('Warning: Debug is enabled in <a href="%1">system settings</a>. This should not be enabled on production servers.',
[1 => CRM_Utils_System::url('civicrm/admin/setting/debug', 'reset=1')]),
ts('Debug Mode Enabled'),
- \Psr\Log\LogLevel::WARNING,
+ CRM_Core_Config::environment() == 'Production' ? \Psr\Log\LogLevel::WARNING : \Psr\Log\LogLevel::INFO,
'fa-bug'
);
$message->addAction(
public function checkOutboundMail() {
$messages = [];
+ // CiviMail doesn't work in non-production environments; skip.
+ if (CRM_Core_Config::environment() != 'Production') {
+ return $messages;
+ }
+
$mailingInfo = Civi::settings()->get('mailing_backend');
if (($mailingInfo['outBound_option'] == CRM_Mailing_Config::OUTBOUND_OPTION_REDIRECT_TO_DB
|| (defined('CIVICRM_MAIL_LOG') && CIVICRM_MAIL_LOG)
public function checkDomainNameEmail() {
$messages = [];
+ // CiviMail doesn't work in non-production environments; skip.
+ if (CRM_Core_Config::environment() != 'Production') {
+ return $messages;
+ }
+
list($domainEmailName, $domainEmailAddress) = CRM_Core_BAO_Domain::getNameAndEmail(TRUE);
$domain = CRM_Core_BAO_Domain::getDomain();
$domainName = $domain->name;
*/
public function checkDefaultMailbox() {
$messages = [];
+
+ // CiviMail doesn't work in non-production environments; skip.
+ if (CRM_Core_Config::environment() != 'Production') {
+ return $messages;
+ }
+
$config = CRM_Core_Config::singleton();
if (in_array('CiviMail', $config->enableComponents) &&
public function checkLastCron() {
$messages = [];
+ // Cron doesn't work in non-production environments; skip.
+ if (CRM_Core_Config::environment() != 'Production') {
+ return $messages;
+ }
+
$statusPreference = new CRM_Core_DAO_StatusPreference();
$statusPreference->domain_id = CRM_Core_Config::domainID();
$statusPreference->name = 'checkLastCron';
public function checkReplyIdForMailing() {
$messages = [];
+ // CiviMail doesn't work in non-production environments; skip.
+ if (CRM_Core_Config::environment() != 'Production') {
+ return $messages;
+ }
+
if (!CRM_Mailing_PseudoConstant::defaultComponent('Reply', '')) {
$messages[] = new CRM_Utils_Check_Message(
__FUNCTION__,
__FUNCTION__,
ts('The environment of this CiviCRM instance is set to \'%1\'. Certain functionality like scheduled jobs has been disabled.', [1 => $environment]),
ts('Non-Production Environment'),
- \Psr\Log\LogLevel::ALERT,
+ \Psr\Log\LogLevel::NOTICE,
'fa-bug'
);
}