Add in release notes and bump version to be 5.17.2
[civicrm-core.git] / sql / GenerateData.php
index 5b47295608203453fd1737a044ff36efa03c5fe6..ebd098bdd4981006d14e16a090851c41d0f9738c 100644 (file)
@@ -196,16 +196,23 @@ class CRM_GCD {
     $this->householdIndividual = array_combine($this->Household, $this->householdIndividual);
   }
 
-  /*********************************
+  /*
    * private members
-   *********************************/
+   *
+   */
 
-  // enum's from database
+  /**
+   * enum's from database
+   * @var array
+   */
   private $preferredCommunicationMethod = array('1', '2', '3', '4', '5');
   private $contactType = array('Individual', 'Household', 'Organization');
   private $phoneType = array('1', '2', '3', '4');
 
-  // customizable enums (foreign keys)
+  /**
+   * customizable enums (foreign keys)
+   * @var array
+   */
   private $prefix = array(
     // Female
     1 => array(
@@ -219,35 +226,56 @@ class CRM_GCD {
       4 => 'Dr.',
     ),
   );
+  /**
+   * @var array
+   */
   private $suffix = array(1 => 'Jr.', 2 => 'Sr.', 3 => 'II', 4 => 'III');
   private $gender = array(1 => 'female', 2 => 'male');
 
-  // store domain id's
+  /**
+   * store domain id's
+   * @var array
+   */
   private $domain = array();
 
-  // store contact id's
+  /**
+   * store contact id's
+   * @var array
+   */
   private $contact = array();
   private $Individual = array();
   private $Household = array();
   private $Organization = array();
 
   // store which contacts have a location entity
-  // for automatic management of is_primary field
+  /**
+   * for automatic management of is_primary field
+   * @var array
+   */
   private $location = array(
     'Email' => array(),
     'Phone' => array(),
     'Address' => array(),
   );
 
-  // stores the strict individual id and household id to individual id mapping
+  /**
+   * stores the strict individual id and household id to individual id mapping
+   * @var array
+   */
   private $strictIndividual = array();
   private $householdIndividual = array();
   private $householdName = array();
 
-  // sample data in xml format
+  /**
+   * sample data in xml format
+   * @var array
+   */
   private $sampleData = array();
 
-  // private vars
+  /**
+   * private vars
+   * @var array
+   */
   private $startCid;
   private $numIndividual = 0;
   private $numHousehold = 0;
@@ -261,7 +289,7 @@ class CRM_GCD {
 
   /*********************************
    * private methods
-   ********************************
+   * *******************************
    * @param int $size
    * @return string
    */
@@ -1167,7 +1195,8 @@ class CRM_GCD {
     //In this function when we add groups that time we are cache the contact fields
     //But at the end of setup we are appending sample custom data, so for consistency
     //reset the cache.
-    CRM_Core_BAO_Cache::deleteGroup('contact fields');
+    Civi::cache('fields')->flush();
+    CRM_Core_BAO_Cache::resetCaches();
   }
 
   /**
@@ -1246,7 +1275,6 @@ class CRM_GCD {
         $this->stateMap[$dao->abbreviation] = $dao->id;
         $this->states[$dao->id] = $dao->name;
       }
-      $dao->free();
     }
 
     $offset = mt_rand(1, 43000);