* @throws \Civi\API\Exception\UnauthorizedException
*/
public function getChecksConfig() {
- if (empty(Civi::$statics[__FUNCTION__])) {
- Civi::$statics[__FUNCTION__] = (array) StatusPreference::get(FALSE)
- ->addWhere('domain_id', '=', 'current_domain')
- ->execute()->indexBy('name');
+ if (!isset(Civi::$statics[__FUNCTION__])) {
+ // TODO: Remove this check when MINIMUM_UPGRADABLE_VERSION goes to 4.7.
+ if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version() && !CRM_Core_DAO::checkTableExists('civicrm_status_pref')) {
+ Civi::$statics[__FUNCTION__] = [];
+ }
+ else {
+ Civi::$statics[__FUNCTION__] = (array) StatusPreference::get(FALSE)
+ ->addWhere('domain_id', '=', 'current_domain')
+ ->execute()->indexBy('name');
+ }
}
return Civi::$statics[__FUNCTION__];
}
* @throws CRM_Core_Exception
*/
public function checkLastCron($force = FALSE) {
+ // TODO: Remove this check when MINIMUM_UPGRADABLE_VERSION goes to 4.7.
+ if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version()) {
+ return [];
+ }
+
$messages = [];
// Cron doesn't work in non-production environments; skip.
* @return CRM_Utils_Check_Message[]
*/
public function checkOptionGroupValues() {
+ if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version()) {
+ return [];
+ }
+
$messages = [];
$problemValues = [];
$optionGroups = civicrm_api3('OptionGroup', 'get', [
* @throws \CiviCRM_API3_Exception
*/
private function checkStatusPreference() {
+ // TODO: Remove this check when MINIMUM_UPGRADABLE_VERSION goes to 4.7.
+ if (CRM_Utils_System::version() !== CRM_Core_BAO_Domain::version() && !CRM_Core_DAO::checkTableExists('civicrm_status_pref')) {
+ return FALSE;
+ }
+
$this->hiddenUntil = FALSE;
// Debug & info can't be hidden
if ($this->level < 2) {