Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-10029

SMTP settings form setDefaultValues does not filter civicrm_preferences by domain_id or is_domain (3.4)

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.4.8
    • Fix Version/s: 3.4.8
    • Component/s: None
    • Labels:
      None

      Description

      (This affects 3.4 but not 4.1, as 4.1 uses the new CRM_Core_BAO_Setting.)

      CRM_Admin_Form_Setting_Smtp::setDefaultValues does this...

      $mailingDomain = new CRM_Core_DAO_Preferences();
      $mailingDomain->find(true);

      ...which retrieves any old row from civicrm_preferences. So if the first row retrieved relates to another domain_id, that's what will be used to set the form defaults. Changing the above to...

      $mailingDomain = new CRM_Core_DAO_Preferences();
      $mailingDomain->domain_id = CRM_Core_Config::domainID( );
      $mailingDomain->is_domain = true;
      $mailingDomain->find(true);

      ...fixes it. Patch attached.

        Attachments

          Activity

            People

            • Assignee:
              lobo Donald A. Lobo
              Reporter:
              davej Dave Jenkins
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: