/**
* Check defined indices exist.
*
- * @return array
+ * @return CRM_Utils_Check_Message[]
* @throws \CiviCRM_API3_Exception
*/
public function checkIndices() {
}
/**
- * @return array
+ * @return CRM_Utils_Check_Message[]
*/
public function checkMissingLogTables() {
$messages = [];
/**
* Check that no smart groups exist that contain deleted custom fields.
*
- * @return array
+ * @return CRM_Utils_Check_Message[]
*/
public function checkSmartGroupCustomFieldCriteria() {
+ if (CRM_Core_BAO_Domain::isDBUpdateRequired()) {
+ // Do not run this check when the db has not been updated as it might fail on non-updated schema issues.
+ return [];
+ }
$messages = $problematicSG = [];
$customFieldIds = array_keys(CRM_Core_BAO_CustomField::getFields('ANY', FALSE, FALSE, NULL, NULL, FALSE, FALSE, FALSE));
try {
return $messages;
}
+ /**
+ * @return CRM_Utils_Check_Message[]
+ */
+ public function checkMoneyValueFormatConfig() {
+ $messages = [];
+ if (CRM_Core_Config::singleton()->moneyvalueformat !== '%!i') {
+ $msg = new CRM_Utils_Check_Message(
+ __FUNCTION__,
+ ts(
+ '<p>The Monetary Value Display format is a deprecated setting, and this site has a non-standard format. Please report your configuration on <a href="%1">this Gitlab issue</a>.',
+ [1 => 'https://lab.civicrm.org/dev/core/-/issues/1494']
+ ),
+ ts('Deprecated monetary value display format configuration'),
+ \Psr\Log\LogLevel::WARNING,
+ 'fa-server'
+ );
+ $messages[] = $msg;
+ }
+ return $messages;
+ }
+
}