Remove method getWordReplacement.
authorBradley Taylor <hello@brad-taylor.co.uk>
Wed, 19 Jan 2022 22:31:50 +0000 (22:31 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Wed, 19 Jan 2022 22:31:50 +0000 (22:31 +0000)
It appears to have never been used since its introduction 8 years ago,
and furthermore calls functions which don't exist.

Therefore, it would be unlikely to work even if it were used.

CRM/Core/BAO/WordReplacement.php

index 09cbdc5330c678a7008dc784fe99c172ab25cac2..8025bc2a45c33c1f91b985d44785ba16af4f413b 100644 (file)
@@ -38,26 +38,6 @@ class CRM_Core_BAO_WordReplacement extends CRM_Core_DAO_WordReplacement implemen
     return CRM_Core_DAO::commonRetrieve('CRM_Core_DAO_WordRepalcement', $params, $defaults);
   }
 
-  /**
-   * Get the domain BAO.
-   *
-   * @param null $reset
-   *
-   * @return null|CRM_Core_BAO_WordReplacement
-   * @throws CRM_Core_Exception
-   */
-  public static function getWordReplacement($reset = NULL) {
-    static $wordReplacement = NULL;
-    if (!$wordReplacement || $reset) {
-      $wordReplacement = new CRM_Core_BAO_WordReplacement();
-      $wordReplacement->id = CRM_Core_Config::wordReplacementID();
-      if (!$wordReplacement->find(TRUE)) {
-        throw new CRM_Core_Exception('Unable to find word replacement');
-      }
-    }
-    return $wordReplacement;
-  }
-
   /**
    * Deprecated update function.
    *