CRM-19672 - fix Settings code wierdness in some circumstances
[civicrm-core.git] / CRM / Core / BAO / Domain.php
index 1bfd8e7e98968645a8af36d1d1d11b0f803f5a93..6b1f6cf2db5574e4c1144c5e8401bdf3ce8a8811 100644 (file)
@@ -69,7 +69,7 @@ class CRM_Core_BAO_Domain extends CRM_Core_DAO_Domain {
    *
    * @return CRM_Core_BAO_Domain|null
    */
-  public static function &getDomain($reset = NULL) {
+  public static function getDomain($reset = NULL) {
     static $domain = NULL;
     if (!$domain || $reset) {
       $domain = new CRM_Core_BAO_Domain();
@@ -81,39 +81,6 @@ class CRM_Core_BAO_Domain extends CRM_Core_DAO_Domain {
     return $domain;
   }
 
-  /**
-   * Change active domain (ie. to perform a temporary action) such as changing
-   * config for all domains
-   *
-   * Switching around the global domain variable is very risky business. This
-   * is ONLY used as a hack to allow CRM_Core_BAO_Setting::setItems to manipulate
-   * the civicrm_domain.config_backend in multiple domains. When/if config_backend
-   * goes away, this hack should be removed.
-   *
-   * @param int $domainID
-   *   Id for domain you want to set as current.
-   * @deprecated
-   * @see http://issues.civicrm.org/jira/browse/CRM-11204
-   */
-  public static function setDomain($domainID) {
-    CRM_Core_Config::domainID($domainID);
-    self::getDomain($domainID);
-    CRM_Core_Config::singleton(TRUE, TRUE);
-  }
-
-  /**
-   * Reset domain to default (ie. as loaded from settings). This is the
-   * counterpart to CRM_Core_BAO_Domain::setDomain.
-   *
-   * @deprecated
-   * @see CRM_Core_BAO_Domain::setDomain
-   */
-  public static function resetDomain() {
-    CRM_Core_Config::domainID(NULL, TRUE);
-    self::getDomain(NULL, TRUE);
-    CRM_Core_Config::singleton(TRUE, TRUE);
-  }
-
   /**
    * @param bool $skipUsingCache
    *