Deprecate unused CRM_Core_DAO::checkVersion() and remove unused CRM_Upgrade_Form...
authorColeman Watts <coleman@civicrm.org>
Wed, 12 Aug 2020 14:21:49 +0000 (10:21 -0400)
committerColeman Watts <coleman@civicrm.org>
Wed, 12 Aug 2020 14:21:49 +0000 (10:21 -0400)
CRM/Core/DAO.php
CRM/Upgrade/Form.php

index a1cd6f7498915e29b1919cb62dd88662533a633a..d024e0261b4aff5904b7173cf09462d873c500e9 100644 (file)
@@ -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);
   }
 
index 6eb65bf70d3f7092ab6983565eb6d95ecdaaaf76..2ab3c1c7e8d87d909d729d1638c3e331336e53e9 100644 (file)
@@ -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