From: Coleman Watts Date: Wed, 12 Aug 2020 14:21:49 +0000 (-0400) Subject: Deprecate unused CRM_Core_DAO::checkVersion() and remove unused CRM_Upgrade_Form... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=895e3d811f09fdd4a59ca5af6312793bd400cbbd;p=civicrm-core.git Deprecate unused CRM_Core_DAO::checkVersion() and remove unused CRM_Upgrade_Form::checkVersion() --- diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php index a1cd6f7498..d024e0261b 100644 --- a/CRM/Core/DAO.php +++ b/CRM/Core/DAO.php @@ -1181,15 +1181,12 @@ LIKE %1 /** * @param $version - * + * @deprecated * @return bool */ public function checkVersion($version) { - $query = " -SELECT version -FROM civicrm_domain -"; - $dbVersion = CRM_Core_DAO::singleValueQuery($query); + CRM_Core_Error::deprecatedFunctionWarning('CRM_Core_BAO_Domain::version'); + $dbVersion = CRM_Core_BAO_Domain::version(); return trim($version) == trim($dbVersion); } diff --git a/CRM/Upgrade/Form.php b/CRM/Upgrade/Form.php index 6eb65bf70d..2ab3c1c7e8 100644 --- a/CRM/Upgrade/Form.php +++ b/CRM/Upgrade/Form.php @@ -286,19 +286,6 @@ SET version = '$version' return FALSE; } - /** - * @param $version - * - * @return bool - */ - public function checkVersion($version) { - $domainID = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Domain', - $version, 'id', - 'version' - ); - return (bool) $domainID; - } - /** * @return array * @throws Exception