Merge pull request #14543 from eileenmcnaughton/wtf_null
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 17 Jun 2019 14:56:24 +0000 (10:56 -0400)
committerGitHub <noreply@github.com>
Mon, 17 Jun 2019 14:56:24 +0000 (10:56 -0400)
[TEST] add assert to ensure nullArray & nullObject are not contaminated

45 files changed:
CRM/Activity/Form/Activity.php
CRM/Admin/Form/Setting/UpdateConfigBackend.php
CRM/Contact/BAO/Contact.php
CRM/Contact/BAO/Contact/Utils.php
CRM/Contact/BAO/Relationship.php
CRM/Contact/Form/Search/Custom/ActivitySearch.php
CRM/Contact/Form/Search/Custom/Base.php
CRM/Contact/Form/Search/Custom/ContributionAggregate.php
CRM/Contact/Form/Search/Custom/DateAdded.php
CRM/Contact/Form/Search/Custom/EventAggregate.php
CRM/Contact/Form/Search/Custom/TagContributions.php
CRM/Contact/Page/CustomSearch.php
CRM/Contact/Page/Inline/Website.php
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/BAO/ContributionPage.php
CRM/Contribute/BAO/ContributionSoft.php
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Contribute/Form/Task/SearchTaskHookSample.php
CRM/Contribute/Form/Task/Status.php
CRM/Core/BAO/Cache/Psr16.php
CRM/Core/BAO/CustomField.php
CRM/Core/BAO/UFMatch.php
CRM/Core/BAO/Website.php
CRM/Event/BAO/Participant.php
CRM/Event/Form/ParticipantFeeSelection.php
CRM/Financial/BAO/FinancialTypeAccount.php
CRM/Financial/BAO/Payment.php
CRM/Financial/Form/FinancialAccount.php
CRM/Financial/Page/FinancialType.php
CRM/Friend/BAO/Friend.php
CRM/Logging/Schema.php
CRM/Member/BAO/Membership.php
CRM/Member/BAO/MembershipStatus.php
CRM/Price/BAO/LineItem.php
CRM/Upgrade/Form.php
CRM/Upgrade/Incremental/php/FourFive.php
CRM/Upgrade/Incremental/php/FourThree.php
CRM/Utils/Mail/Incoming.php
CRM/Utils/String.php
css/civicrm.css
js/crm.ajax.js
sql/GenerateReportData.php
templates/CRM/Admin/Form/Setting/UpdateConfigBackend.tpl
tests/phpunit/CRM/Contribute/BAO/ContributionTest.php
tests/phpunit/api/v3/ContributionTest.php

index ff23cf2550ccc87841662c9e25fc4e14b6049a18..eec77a752c232b4b4221d707fb8005516224d5b2 100644 (file)
@@ -813,7 +813,6 @@ class CRM_Activity_Form_Activity extends CRM_Contact_Form_Task {
           'type' => 'upload',
           'name' => ts('Save'),
           'isDefault' => TRUE,
-          'submitOnce' => TRUE,
         ],
         [
           'type' => 'cancel',
index d1a258738c8bc6e4d18f601fad56793de456445b..d4cf4ae094fd9fc2e3d20febafffc199ecbb82ab 100644 (file)
@@ -42,22 +42,25 @@ class CRM_Admin_Form_Setting_UpdateConfigBackend extends CRM_Admin_Form_Setting
   public function buildQuickForm() {
     CRM_Utils_System::setTitle(ts('Settings - Cleanup Caches and Update Paths'));
 
-    $this->addElement(
-      'submit', $this->getButtonName('next', 'cleanup'), 'Cleanup Caches',
-      ['class' => 'crm-form-submit', 'id' => 'cleanup-cache']
-    );
-
-    $this->addElement(
-      'submit', $this->getButtonName('next', 'resetpaths'), 'Reset Paths',
-      ['class' => 'crm-form-submit', 'id' => 'resetpaths']
-    );
-
-    //parent::buildQuickForm();
+    $this->addButtons([
+      [
+        'type' => 'next',
+        'name' => ts('Cleanup Caches'),
+        'subName' => 'cleanup',
+        'icon' => 'fa-undo',
+
+      ],
+      [
+        'type' => 'next',
+        'name' => ts('Reset Paths'),
+        'subName' => 'resetpaths',
+        'icon' => 'fa-terminal',
+      ],
+    ]);
   }
 
   public function postProcess() {
-    if (!empty($_POST['_qf_UpdateConfigBackend_next_cleanup'])) {
-
+    if (isset($_REQUEST['_qf_UpdateConfigBackend_next_cleanup'])) {
       $config = CRM_Core_Config::singleton();
 
       // cleanup templates_c directory
@@ -74,14 +77,13 @@ class CRM_Admin_Form_Setting_UpdateConfigBackend extends CRM_Admin_Form_Setting
 
       CRM_Core_Session::setStatus(ts('Cache has been cleared and menu has been rebuilt successfully.'), ts("Success"), "success");
     }
-
-    if (!empty($_POST['_qf_UpdateConfigBackend_next_resetpaths'])) {
+    elseif (isset($_REQUEST['_qf_UpdateConfigBackend_next_resetpaths'])) {
       $msg = CRM_Core_BAO_ConfigSetting::doSiteMove();
 
       CRM_Core_Session::setStatus($msg, ts("Success"), "success");
     }
 
-    return CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/setting/updateConfigBackend', 'reset=1'));
+    CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/setting/updateConfigBackend', 'reset=1'));
   }
 
 }
index b7e5dace1253161524d0c7a14e09c7b2a0095c63..b4b5c6e2c711bb9a524573750459bef0f29965df 100644 (file)
@@ -369,7 +369,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
             'subject' => CRM_Utils_Array::value('subject', $note),
             'contact_id' => $contactId,
           );
-          CRM_Core_BAO_Note::add($noteParams, CRM_Core_DAO::$_nullArray);
+          CRM_Core_BAO_Note::add($noteParams);
         }
       }
       else {
@@ -386,7 +386,7 @@ class CRM_Contact_BAO_Contact extends CRM_Contact_DAO_Contact {
           'subject' => CRM_Utils_Array::value('subject', $params),
           'contact_id' => $contactId,
         );
-        CRM_Core_BAO_Note::add($noteParams, CRM_Core_DAO::$_nullArray);
+        CRM_Core_BAO_Note::add($noteParams);
       }
     }
 
index a839ce5626e2ce1a689762ee748e9146a6cd97c7..8850d9acc50227b806e5711cbe3223976740535c 100644 (file)
@@ -132,9 +132,7 @@ SELECT count( DISTINCT contact_type )
 FROM   civicrm_contact
 WHERE  id IN ( $idString )
 ";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     return $count > 1 ? TRUE : FALSE;
   }
 
index 4898e7f204dbb045d68c315d0a16b1781198a5c9..1f10c643020d11d00d344a0aad50a2ff086df846 100644 (file)
@@ -1751,7 +1751,7 @@ SELECT count(*)
     AND is_current_member = 1";
             $result = CRM_Core_DAO::singleValueQuery($query);
             if ($result < CRM_Utils_Array::value('max_related', $membershipValues, PHP_INT_MAX)) {
-              CRM_Member_BAO_Membership::create($membershipValues, CRM_Core_DAO::$_nullArray);
+              CRM_Member_BAO_Membership::create($membershipValues);
             }
           }
         }
index afda78618c2c1b44213df67ddbfc2b8c17df9a4f..30d95f1847610477d06691ef3a7883547d867e9e 100644 (file)
@@ -368,9 +368,7 @@ ORDER BY contact_a.sort_name';
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index b4edd5986d433669514cea7ece71802b0c00cf32..9baf5429b3ed21345c52a8c399806582c6fce281 100644 (file)
@@ -95,7 +95,7 @@ class CRM_Contact_Form_Search_Custom_Base {
       return $sql;
     }
 
-    return CRM_Core_DAO::composeQuery($sql, CRM_Core_DAO::$_nullArray);
+    return CRM_Core_DAO::composeQuery($sql);
   }
 
   /**
index df9d090461b9fed8e9ab207871720fdacdc79bab..5437e0d2a0253d706cd3008f4032274b06b4996d 100644 (file)
@@ -301,9 +301,7 @@ civicrm_contact AS contact_a {$this->_aclFrom}
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index f3be4f2e2d97d599c906c81907c5475201fc2183..12b3a03e54ff1f6e04802d0760fdd9b0e49d2ac0 100644 (file)
@@ -211,7 +211,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
               date_added >= '$startDate 00:00:00'
               $endDateFix";
 
-    CRM_Core_DAO::executeQuery($dateRange, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($dateRange);
 
     // Only include groups in the search query of one or more Include OR Exclude groups has been selected.
     // CRM-6356
@@ -256,7 +256,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
                      civicrm_group_contact.status = 'Added' AND
                      civicrm_group_contact.group_id IN( {$xGroups})";
 
-        CRM_Core_DAO::executeQuery($excludeGroup, CRM_Core_DAO::$_nullArray);
+        CRM_Core_DAO::executeQuery($excludeGroup);
 
         //search for smart group contacts
         foreach ($this->_excludeGroups as $keys => $values) {
@@ -271,7 +271,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
 
             $smartGroupQuery = " INSERT IGNORE INTO {$this->_xgTable}(contact_id) $smartSql";
 
-            CRM_Core_DAO::executeQuery($smartGroupQuery, CRM_Core_DAO::$_nullArray);
+            CRM_Core_DAO::executeQuery($smartGroupQuery);
           }
         }
       }
@@ -303,7 +303,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
         $includeGroup .= " AND  {$this->_xgTable}.contact_id IS null";
       }
 
-      CRM_Core_DAO::executeQuery($includeGroup, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($includeGroup);
 
       //search for smart group contacts
       foreach ($this->_includeGroups as $keys => $values) {
@@ -330,13 +330,13 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
                         {$this->_igTable}(contact_id)
                         $smartSql";
 
-          CRM_Core_DAO::executeQuery($smartGroupQuery, CRM_Core_DAO::$_nullArray);
+          CRM_Core_DAO::executeQuery($smartGroupQuery);
           $insertGroupNameQuery = "UPDATE IGNORE {$this->_igTable}
                         SET group_names = (SELECT title FROM civicrm_group
                             WHERE civicrm_group.id = $values)
                         WHERE {$this->_igTable}.contact_id IS NOT NULL
                             AND {$this->_igTable}.group_names IS NULL";
-          CRM_Core_DAO::executeQuery($insertGroupNameQuery, CRM_Core_DAO::$_nullArray);
+          CRM_Core_DAO::executeQuery($insertGroupNameQuery);
         }
       }
     }
@@ -395,9 +395,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
@@ -405,12 +403,12 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C
     //drop the temp. tables if they exist
     if ($this->_igTable && !empty($this->_includeGroups)) {
       $sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_igTable}";
-      CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($sql);
     }
 
     if ($this->_xgTable && !empty($this->_excludeGroups)) {
       $sql = "DROP TEMPORARY TABLE IF EXISTS {$this->_xgTable}";
-      CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+      CRM_Core_DAO::executeQuery($sql);
     }
   }
 
index 441688dab657400d737306576b1ddd79203afc31..e3b36fc95dc76ac3a4e69f5bd37ad9eb72dcf0e3 100644 (file)
@@ -306,9 +306,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
         WHERE   $where
         ";
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     $totals = [];
     while ($dao->fetch()) {
       $totals['payment_amount'] = $dao->payment_amount;
@@ -329,9 +327,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index df0e60488fe1774121e44e2a0a83c844f30a1491..d6bd1b17d8ec73456dfa141d52b01e49d5673ea1 100644 (file)
@@ -229,9 +229,7 @@ WHERE  $where
   public function count() {
     $sql = $this->all();
 
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     return $dao->N;
   }
 
index 15b313f23182753fd6a40afb4f82e2b07fafb021..0ee1969f915b7b7fc3cbafafa72ad330d085f2d6 100644 (file)
@@ -56,9 +56,7 @@ AND    g.name = 'custom_search'
 AND    v.is_active = 1
 ORDER By  v.weight
 ";
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
 
     $rows = [];
     while ($dao->fetch()) {
index 929ec1e5091c6e49c2bf312ed5b2e800dd7f15bd..5e9ce5ea2c0e782252d0ce8e215a0f199cc7b7c8 100644 (file)
@@ -48,7 +48,7 @@ class CRM_Contact_Page_Inline_Website extends CRM_Core_Page {
     $websiteTypes = CRM_Core_PseudoConstant::get('CRM_Core_DAO_Website', 'website_type_id');
 
     $params = ['contact_id' => $contactId];
-    $websites = CRM_Core_BAO_Website::getValues($params, CRM_Core_DAO::$_nullArray);
+    $websites = CRM_Core_BAO_Website::getValues($params);
     if (!empty($websites)) {
       foreach ($websites as $key => & $value) {
         $value['website_type'] = $websiteTypes[$value['website_type_id']];
index 3352e57c756fb8a57146a9578a8569ac4d1c9d9b..fd873f3de6e3e689c70c0925ceab7fcbd6570c84 100644 (file)
@@ -705,7 +705,7 @@ class CRM_Contribute_BAO_Contribution extends CRM_Contribute_DAO_Contribution {
    *
    * @return CRM_Contribute_BAO_Contribution
    */
-  public static function retrieve(&$params, &$defaults, &$ids) {
+  public static function retrieve(&$params, &$defaults = [], &$ids = []) {
     $contribution = CRM_Contribute_BAO_Contribution::getValues($params, $defaults, $ids);
     return $contribution;
   }
index fa6c55592e32e76087eafd1c25caa7497d46dea4..164ab946ab2e28a47329c09b60e6d9823e082f16 100644 (file)
@@ -734,7 +734,7 @@ FROM civicrm_premiums
 WHERE entity_table = 'civicrm_contribution_page'
       AND entity_id ={$id}";
 
-    $premiumDao = CRM_Core_DAO::executeQuery($premiumQuery, CRM_Core_DAO::$_nullArray);
+    $premiumDao = CRM_Core_DAO::executeQuery($premiumQuery);
     while ($premiumDao->fetch()) {
       if ($premiumDao->id) {
         CRM_Core_DAO::copyGeneric('CRM_Contribute_DAO_PremiumsProduct', [
index 8b7e1ec8c9d66e5ee49a3923a448fd13274d477e..1ddfbedc566d9806359f732003c9328ad002e9c1 100644 (file)
@@ -168,8 +168,9 @@ class CRM_Contribute_BAO_ContributionSoft extends CRM_Contribute_DAO_Contributio
         $honorId = CRM_Utils_Array::value(0, $ids);
       }
 
+      $null = [];
       $honorId = CRM_Contact_BAO_Contact::createProfileContact(
-        $params['honor'], CRM_Core_DAO::$_nullArray,
+        $params['honor'], $null,
         $honorId, NULL,
         $form->_values['honoree_profile_id']
       );
index 196a0c348baae2090d1b8333bed4c92ad51787a9..8da1c12557af9b6937ffc18bcd72f923bfeee69a 100644 (file)
@@ -338,9 +338,7 @@ SELECT *
 FROM   civicrm_contribution_product
 WHERE  contribution_id = {$id}
 ";
-    $dao = CRM_Core_DAO::executeQuery($sql,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($sql);
     if ($dao->fetch()) {
       $this->_premiumID = $dao->id;
       $this->_productDAO = $dao;
index 6c84b5315d193be9ba4d804f3951d14da3490d91..81a3f827df1fe848946569b5ea5446cc766fe828 100644 (file)
@@ -55,9 +55,7 @@ class CRM_Contribute_Form_Task_SearchTaskHookSample extends CRM_Contribute_Form_
 INNER JOIN civicrm_contact ct ON ( co.contact_id = ct.id )
      WHERE co.id IN ( $contribIDs )";
 
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[] = [
index bc291dc167b35b69b858d193e7b3f584c14628f9..388362b05cef6830c5f2698776aaa52ecc882fe8 100644 (file)
@@ -70,9 +70,7 @@ SELECT count(*)
 FROM   civicrm_contribution
 WHERE  contribution_status_id != 2
 AND    {$this->_componentClause}";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     if ($count != 0) {
       CRM_Core_Error::statusBounce(ts('Please select only online contributions with Pending status.'));
     }
@@ -110,9 +108,7 @@ FROM   civicrm_contact c,
        civicrm_contribution co
 WHERE  co.contact_id = c.id
 AND    co.id IN ( $contribIDs )";
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     // build a row for each contribution id
     $this->_rows = [];
@@ -323,9 +319,7 @@ LEFT JOIN civicrm_participant         p  ON pp.participant_id  = p.id
 WHERE     c.id IN ( $contributionIDs )";
 
     $rows = [];
-    $dao = CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $dao = CRM_Core_DAO::executeQuery($query);
 
     while ($dao->fetch()) {
       $rows[$dao->contribution_id]['component'] = $dao->participant_id ? 'event' : 'contribute';
index b1de19199694dd1c85e2b8a49bf8907bb7a8effd..953d079618cb56f713dd9a49c56b0006b1f96203 100644 (file)
@@ -199,9 +199,6 @@ class CRM_Core_BAO_Cache_Psr16 {
       // civihr/uk.co.compucorp.civicrm.hrcore
       'HRCore_Info',
 
-      // nz.co.fuzion.entitysetting
-      'CiviCRM setting Spec',
-
     ];
     // Handle Legacy Multisite caching group.
     $extensions = CRM_Extension_System::singleton()->getManager();
@@ -216,6 +213,17 @@ class CRM_Core_BAO_Cache_Psr16 {
         $groups[] = 'descendant groups for an org';
       }
     }
+    $entitySettingExtensionStatus = $extensions->getStatus('nz.co.fuzion.entitysetting');
+    if ($multisiteExtensionStatus == $extensions::STATUS_INSTALLED) {
+      $extension_version = civicrm_api3('Extension', 'get', ['key' => 'nz.co.fuzion.entitysetting'])['values'][0]['version'];
+      if (version_compare($extension_version, '1.3', '<')) {
+        Civi::log()->warning(
+          'CRM_Core_BAO_Cache_PSR is deprecated for entity setting extension, you should upgrade to the latest version to avoid this warning, this code will be removed at the end of 2019',
+          ['civi.tag' => 'deprecated']
+        );
+        $groups[] = 'CiviCRM setting Spec';
+      }
+    }
     return $groups;
   }
 
index dcfda0e64bff0811a77fefc1ee5d23979b34b18e..36391dba093c5d8f5ea23860b6fbfbf04a35e1ec 100644 (file)
@@ -1945,9 +1945,7 @@ SELECT count(*)
 FROM   $tableName
 WHERE  $columnName is not null
 ";
-    $count = CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    $count = CRM_Core_DAO::singleValueQuery($query);
     if ($count > 0) {
       $query = "
 SELECT extends
index 778dd29f42ea9a7911b2d77b4afc9b3e0270ea71..83713e6cf5e06545e7e794594977740af1e70fec 100644 (file)
@@ -296,7 +296,7 @@ AND    domain_id = %2
           }
         }
 
-        $contactId = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray);
+        $contactId = CRM_Contact_BAO_Contact::createProfileContact($params);
         $ufmatch->contact_id = $contactId;
         $ufmatch->uf_name = $uniqId;
       }
index 57bd28beeea368cef4ea54b4c505a688f176614d..f7fba2c6a257b2e708565e065e644e0cdd093fbf 100644 (file)
@@ -153,7 +153,7 @@ class CRM_Core_BAO_Website extends CRM_Core_DAO_Website {
    *
    * @return bool
    */
-  public static function &getValues(&$params, &$values) {
+  public static function &getValues(&$params = [], &$values = []) {
     $websites = [];
     $website = new CRM_Core_DAO_Website();
     $website->contact_id = $params['contact_id'];
index db4bf4f7c2c1f8c57c3b2e192cea16dc7a995ee2..9819a2712fe22c13bc47b5b67325644445bd98ea 100644 (file)
@@ -161,7 +161,7 @@ class CRM_Event_BAO_Participant extends CRM_Event_DAO_Participant {
    *
    * @return CRM_Event_BAO_Participant|null the found object or null
    */
-  public static function getValues(&$params, &$values, &$ids) {
+  public static function getValues(&$params, &$values = [], &$ids = []) {
     if (empty($params)) {
       return NULL;
     }
index 50511fba177e14eedee1eae5890f27a3ef491471..ee1827f388815e4dea8dfa29d0859a363c6d9963 100644 (file)
@@ -244,7 +244,7 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
     // email sending
     if (!empty($params['send_receipt'])) {
       $fetchParticipantVals = ['id' => $this->_participantId];
-      CRM_Event_BAO_Participant::getValues($fetchParticipantVals, $participantDetails, CRM_Core_DAO::$_nullArray);
+      CRM_Event_BAO_Participant::getValues($fetchParticipantVals, $participantDetails);
       $participantParams = array_merge($params, $participantDetails[$this->_participantId]);
       $mailSent = $this->emailReceipt($participantParams);
     }
index faa84e3f69f619208a13f3a7707a7e2e27c81f67..be81d888e154c19526c2aa790ffe9ebadf673d9b 100644 (file)
@@ -51,7 +51,7 @@ class CRM_Financial_BAO_FinancialTypeAccount extends CRM_Financial_DAO_EntityFin
    *
    * @return CRM_Contribute_BAO_ContributionType
    */
-  public static function retrieve(&$params, &$defaults, &$allValues = []) {
+  public static function retrieve(&$params, &$defaults = [], &$allValues = []) {
     $financialTypeAccount = new CRM_Financial_DAO_EntityFinancialAccount();
     $financialTypeAccount->copyValues($params);
     $financialTypeAccount->find();
index 9a463033b6befe31cd2d993c9a506c2ec8a7e0b6..c1608c805ebf9e48b0e9752787af2700165da70d 100644 (file)
@@ -492,7 +492,7 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
   protected static function getContributionAndParamsInFormatForRecordFinancialTransaction($contributionId) {
     $getInfoOf['id'] = $contributionId;
     $defaults = [];
-    $contributionDAO = CRM_Contribute_BAO_Contribution::retrieve($getInfoOf, $defaults, CRM_Core_DAO::$_nullArray);
+    $contributionDAO = CRM_Contribute_BAO_Contribution::retrieve($getInfoOf, $defaults);
 
     // build params for recording financial trxn entry
     $params['contribution'] = $contributionDAO;
index f304e7fcfa8d4c5c63739f7e960145032d26cc52..227e6d01432b63ea59bb9bc61b5e7942fc72b363 100644 (file)
@@ -53,7 +53,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
       $params = [
         'id' => $this->_id,
       ];
-      $financialAccount = CRM_Financial_BAO_FinancialAccount::retrieve($params, CRM_Core_DAO::$_nullArray);
+      $financialAccount = CRM_Financial_BAO_FinancialAccount::retrieve($params);
       $financialAccountTypeId = key(CRM_Core_PseudoConstant::accountOptionValues('financial_account_type', NULL, " AND v.name LIKE 'Asset' "));
       if ($financialAccount->financial_account_type_id == $financialAccountTypeId
         && strtolower($financialAccount->account_type_code) == 'ar'
index 6bb3b325ff793461cbd0f9cdc5ca11d19c7ce5a9..f0e1f1823214186f0c091af5ea1d724961baa01a 100644 (file)
@@ -121,7 +121,8 @@ class CRM_Financial_Page_FinancialType extends CRM_Core_Page_Basic {
 
       $params['entity_id'] = $dao->id;
       $params['entity_table'] = 'civicrm_financial_type';
-      CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, CRM_Core_DAO::$_nullArray, $financialAccountIds);
+      $null = [];
+      CRM_Financial_BAO_FinancialTypeAccount::retrieve($params, $null, $financialAccountIds);
 
       foreach ($financialAccountIds as $key => $values) {
         if (!empty($financialAccounts[$values['financial_account_id']])) {
index b817cae9091116de4a27f1ae20cd914aa1d0850d..2e8328255df8039b28d6263b42276513ceaad0c0 100644 (file)
@@ -64,7 +64,7 @@ class CRM_Friend_BAO_Friend extends CRM_Friend_DAO_Friend {
    * @return int
    */
   public static function add(&$params) {
-    return CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray);
+    return CRM_Contact_BAO_Contact::createProfileContact($params);
   }
 
   /**
index 9ce4883b18131419b00686628361d7aa97a1259a..858c693813a1091add5053308e01b45fe755eb24 100644 (file)
@@ -581,7 +581,7 @@ AND    (TABLE_NAME LIKE 'log_civicrm_%' $nonStandardTableNameString )
     if ($force || !isset(\Civi::$statics[__CLASS__]['columnsOf'][$table])) {
       $from = (substr($table, 0, 4) == 'log_') ? "`{$this->db}`.$table" : $table;
       CRM_Core_TemporaryErrorScope::ignoreException();
-      $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+      $dao = CRM_Core_DAO::executeQuery("SHOW COLUMNS FROM $from", [], TRUE, NULL, FALSE, FALSE);
       if (is_a($dao, 'DB_Error')) {
         return [];
       }
@@ -737,7 +737,7 @@ WHERE  table_schema IN ('{$this->db}', '{$civiDB}')";
    * @param string $table
    */
   private function createLogTableFor($table) {
-    $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    $dao = CRM_Core_DAO::executeQuery("SHOW CREATE TABLE $table", [], TRUE, NULL, FALSE, FALSE);
     $dao->fetch();
     $query = $dao->Create_Table;
 
@@ -785,10 +785,10 @@ COLS;
     $query = self::fixTimeStampAndNotNullSQL($query);
     $query = preg_replace("/(,*\n*\) )ENGINE/m", "$cols\n) ENGINE", $query);
 
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
 
     $columns = implode(', ', $this->columnsOf($table));
-    CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, @uniqueID, @civicrm_user_id, 'Initialization' FROM {$table}", CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery("INSERT INTO `{$this->db}`.log_$table ($columns, log_conn_id, log_user_id, log_action) SELECT $columns, @uniqueID, @civicrm_user_id, 'Initialization' FROM {$table}", [], TRUE, NULL, FALSE, FALSE);
 
     $this->tables[] = $table;
     if (empty($this->logs)) {
index 49e5181b8be41e3632a807459c1d369e201b7b2f..833b049fa29fecdd0c9087996d7e12fe3212097f 100644 (file)
@@ -261,7 +261,7 @@ class CRM_Member_BAO_Membership extends CRM_Member_DAO_Membership {
    *
    * @return CRM_Member_BAO_Membership|CRM_Core_Error
    */
-  public static function create(&$params, &$ids, $skipRedirect = FALSE) {
+  public static function create(&$params, &$ids = [], $skipRedirect = FALSE) {
     // always calculate status if is_override/skipStatusCal is not true.
     // giving respect to is_override during import.  CRM-4012
 
@@ -1249,9 +1249,7 @@ SELECT c.contribution_page_id as pageID
    AND mp.membership_id = " . CRM_Utils_Type::escape($membershipID, 'Integer')
       . " ORDER BY mp.id DESC";
 
-    return CRM_Core_DAO::singleValueQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    return CRM_Core_DAO::singleValueQuery($query);
   }
 
   /**
index c3508a7e17765b0a40aa52538626090cc8cfdd09..e6310ae68ee1dfde982bdc5832bbe9e45bce437c 100644 (file)
@@ -137,9 +137,7 @@ class CRM_Member_BAO_MembershipStatus extends CRM_Member_DAO_MembershipStatus {
     // set all other defaults to false.
     if (!empty($params['is_default'])) {
       $query = "UPDATE civicrm_membership_status SET is_default = 0";
-      CRM_Core_DAO::executeQuery($query,
-        CRM_Core_DAO::$_nullArray
-      );
+      CRM_Core_DAO::executeQuery($query);
     }
 
     // action is taken depending upon the mode
index 6119f194780c5f9855566a8c2b68c1b0eb3a61ab..3859a974b859cf1bb5197a5b97c2036fb84f90e7 100644 (file)
@@ -119,7 +119,7 @@ class CRM_Price_BAO_LineItem extends CRM_Price_DAO_LineItem {
    *
    * @return CRM_Price_BAO_LineItem
    */
-  public static function retrieve(&$params, &$defaults) {
+  public static function retrieve(&$params = [], &$defaults = []) {
     $lineItem = new CRM_Price_BAO_LineItem();
     $lineItem->copyValues($params);
     if ($lineItem->find(TRUE)) {
@@ -1212,9 +1212,7 @@ WHERE li.contribution_id = %1";
       $updatedContributionDAO->save();
       // adjusted amount financial_trxn creation
       $updatedContribution = CRM_Contribute_BAO_Contribution::getValues(
-        ['id' => $contributionId],
-        CRM_Core_DAO::$_nullArray,
-        CRM_Core_DAO::$_nullArray
+        ['id' => $contributionId]
       );
       $toFinancialAccount = CRM_Contribute_PseudoConstant::getRelationalFinancialAccount($updatedContribution->financial_type_id, 'Accounts Receivable Account is');
       $adjustedTrxnValues = [
@@ -1279,7 +1277,7 @@ WHERE li.contribution_id = %1";
         $tempFinancialTrxnID = ['id' => $adjustedTrxn->id];
       }
     }
-    $lineObj = CRM_Price_BAO_LineItem::retrieve($lineParams, CRM_Core_DAO::$_nullArray);
+    $lineObj = CRM_Price_BAO_LineItem::retrieve($lineParams);
     // insert financial items
     // ensure entity_financial_trxn table has a linking of it.
     CRM_Financial_BAO_FinancialItem::add($lineObj, $updatedContribution, NULL, $tempFinancialTrxnID);
index 47f71da3eacf855824472ac6665ef962483fa857..008d42210a4fb5c4dad952e6694b9d1d03124644 100644 (file)
@@ -272,9 +272,7 @@ class CRM_Upgrade_Form extends CRM_Core_Form {
    * @return Object
    */
   public function runQuery($query) {
-    return CRM_Core_DAO::executeQuery($query,
-      CRM_Core_DAO::$_nullArray
-    );
+    return CRM_Core_DAO::executeQuery($query);
   }
 
   /**
index f5b9aada4155a31a7044824339a520787b134b01..cd9f0368a267ea09420c5619b00a873240c4d400 100644 (file)
@@ -84,7 +84,7 @@ AND TABLE_SCHEMA = %1
         $sqlDropFK = "ALTER TABLE `civicrm_msg_template`
 DROP FOREIGN KEY `{$dao->CONSTRAINT_NAME}`,
 DROP KEY `{$dao->CONSTRAINT_NAME}`";
-        CRM_Core_DAO::executeQuery($sqlDropFK, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+        CRM_Core_DAO::executeQuery($sqlDropFK, [], TRUE, NULL, FALSE, FALSE);
       }
     }
 
index a444e4962bafc8d5a9973a989b2c5e2068828621..a86316e1db80b9d9252632827f4076c6301445b9 100644 (file)
@@ -834,7 +834,7 @@ FROM   civicrm_financial_item fi";
     $query = "
 ALTER TABLE civicrm_domain ADD contact_id INT( 10 ) UNSIGNED NULL DEFAULT NULL COMMENT 'FK to Contact ID. This is specifically not an FK to avoid circular constraints',
  ADD CONSTRAINT FK_civicrm_domain_contact_id FOREIGN KEY (contact_id) REFERENCES civicrm_contact(id);";
-    CRM_Core_DAO::executeQuery($query, CRM_Core_DAO::$_nullArray, TRUE, NULL, FALSE, FALSE);
+    CRM_Core_DAO::executeQuery($query, [], TRUE, NULL, FALSE, FALSE);
 
     $query = '
 SELECT cd.id, cd.name, ce.email FROM civicrm_domain cd
index 0c5e5300e183b9ad2942b2be343d12800b139c05..eed6ec807509c607987d4c5eeb58ffdce7dec248 100644 (file)
@@ -497,9 +497,7 @@ class CRM_Utils_Mail_Incoming {
 
     CRM_Utils_String::extractName($name, $params);
 
-    return CRM_Contact_BAO_Contact::createProfileContact($params,
-      CRM_Core_DAO::$_nullArray
-    );
+    return CRM_Contact_BAO_Contact::createProfileContact($params);
   }
 
 }
index c740e72a1f3849556d2c6dcf4532d6364947b7dc..d0f295dd18048cd8121fd3bc9b959124572d2ae0 100644 (file)
@@ -295,7 +295,7 @@ class CRM_Utils_String {
       }
       return $match;
     }
-    return CRM_Core_DAO::$_nullArray;
+    return [];
   }
 
   /**
index 14da0227281f6a115bd21bff71399916846088e8..c1c75403f444ef7ec02e6b2040ad8bf499b44b84 100644 (file)
@@ -1443,6 +1443,7 @@ input.crm-form-entityref {
   padding: 4px;
   margin: 0;
   line-height: 15px;
+  white-space: initial;
 }
 
 .crm-container .action-item-wrap {
index efbcf2c1e35f875d979df2fd686d5a9635b280e2..b64f33eec2c2e34beff9ac375974c9b74016de59 100644 (file)
         var buttonContainers = '.crm-submit-buttons, .action-link',
           buttons = [],
           added = [];
-        $(buttonContainers, $el).find('input.crm-form-submit, a.button').each(function() {
+        $(buttonContainers, $el).find('input.crm-form-submit, a.button, button').each(function() {
           var $el = $(this),
             label = $el.is('input') ? $el.attr('value') : $el.text(),
             identifier = $el.attr('name') || $el.attr('href');
index e50b8ddf469fa09672e6eb4a12b73ad48ce199bb..dd74843a02d672476574357d71923db486b04f2d 100644 (file)
@@ -1322,7 +1322,7 @@ class CRM_GCD {
         ('Student', 'Discount membership for full-time students.', " . $contact_id . ", 1, 50, 'year', 1, 'rolling', null, null, 7, 'b_a', 'Public', 2, 1),
         ('Lifetime', 'Lifetime membership.', " . $contact_id . ", 2, 1200, 'lifetime', 1, 'rolling', null, null, 7, 'b_a', 'Admin', 3, 1);
         ";
-    CRM_Core_DAO::executeQuery($membershipType, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($membershipType);
   }
 
   public function addMembership() {
@@ -1399,9 +1399,9 @@ VALUES
       }
     }
 
-    CRM_Core_DAO::executeQuery($membership, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($membership);
 
-    CRM_Core_DAO::executeQuery($activity, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($activity);
   }
 
   /**
@@ -1445,14 +1445,14 @@ VALUES
       ( NULL, 1, 1, 1, 'E 11B Woodbridge Path SW', 11, 'B', NULL, 'Woodbridge', 'Path', NULL, NULL, NULL, NULL, NULL, 'Dayton', NULL, 1034, NULL, '45417', NULL, 1228, 39.7531, -84.2471, NULL),
       ( NULL, 1, 1, 1, 'E 581O Lincoln Dr SW', 581, 'O', NULL, 'Lincoln', 'Dr', NULL, NULL, NULL, NULL, NULL, 'Santa Fe', NULL, 1030, NULL, '87594', NULL, 1228, 35.5212, -105.982, NULL)
       ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql       = "SELECT id from civicrm_address where street_address = 'S 14S El Camino Way E'";
-    $eventAdd1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_address where street_address = 'E 11B Woodbridge Path SW'";
-    $eventAdd2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_address where street_address = 'E 581O Lincoln Dr SW'";
-    $eventAdd3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventAdd3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_email (contact_id, location_type_id, email, is_primary, is_billing, on_hold, hold_date, reset_date)
        VALUES
@@ -1460,14 +1460,14 @@ VALUES
        (NULL, 1, 'tournaments@example.org', 0, 0, 0, NULL, NULL),
        (NULL, 1, 'celebration@example.org', 0, 0, 0, NULL, NULL)
        ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql         = "SELECT id from civicrm_email where email = 'development@example.org'";
-    $eventEmail1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_email where email = 'tournaments@example.org'";
-    $eventEmail2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_email where email = 'celebration@example.org'";
-    $eventEmail3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventEmail3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_phone (contact_id, location_type_id, is_primary, is_billing, mobile_provider_id, phone, phone_type_id)
        VALUES
@@ -1475,14 +1475,14 @@ VALUES
        (NULL, 1, 0, 0, NULL,'204 223-1000', '1'),
        (NULL, 1, 0, 0, NULL,'303 323-1000', '1')
        ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql         = "SELECT id from civicrm_phone where phone = '204 222-1000'";
-    $eventPhone1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_phone where phone = '204 223-1000'";
-    $eventPhone2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql         = "SELECT id from civicrm_phone where phone = '303 323-1000'";
-    $eventPhone3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventPhone3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_loc_block ( address_id, email_id, phone_id, address_2_id, email_2_id, phone_2_id)
        VALUES
@@ -1491,14 +1491,14 @@ VALUES
       ( $eventAdd3, $eventEmail3, $eventPhone3, NULL,NULL,NULL)
        ";
 
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
 
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone1 AND email_id = $eventEmail1 AND address_id = $eventAdd1";
-    $eventLok1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok1 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone2 AND email_id = $eventEmail2 AND address_id = $eventAdd2";
-    $eventLok2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok2 = CRM_Core_DAO::singleValueQuery($sql);
     $sql       = "SELECT id from civicrm_loc_block where phone_id = $eventPhone3 AND email_id = $eventEmail3 AND address_id = $eventAdd3";
-    $eventLok3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $eventLok3 = CRM_Core_DAO::singleValueQuery($sql);
 
     //create event fees
     $optionGroup = "INSERT INTO civicrm_option_group ( name, is_reserved, is_active)
@@ -1507,16 +1507,16 @@ VALUES
       ( 'civicrm_event.amount.2', 0, 1),
       ( 'civicrm_event.amount.3', 0, 1)
 ";
-    CRM_Core_DAO::executeQuery($optionGroup, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($optionGroup);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.1'";
-    $page1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page1 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.2'";
-    $page2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page2 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) from civicrm_option_group where name = 'civicrm_event.amount.3'";
-    $page3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $page3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $optionValue = "INSERT INTO civicrm_option_value (option_group_id, label, value, is_default, weight, is_optgroup, is_reserved, is_active)
       VALUES
@@ -1530,16 +1530,16 @@ VALUES
       ($page3, 'Junior Stars (ages 9-12)', '1000', 0, 2, 0, 0, 1),
       ($page3, 'Super Stars (ages 13-18)', '1500', 0, 3, 0, 0, 1)";
 
-    CRM_Core_DAO::executeQuery($optionValue, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($optionValue);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page1 AND civicrm_option_value.weight=2";
-    $defaultFee1 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee1 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page2 AND civicrm_option_value.weight=2";
-    $defaultFee2 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee2 = CRM_Core_DAO::singleValueQuery($sql);
 
     $sql = "SELECT max(id) FROM civicrm_option_value WHERE civicrm_option_value.option_group_id = $page3 AND civicrm_option_value.weight=2";
-    $defaultFee3 = CRM_Core_DAO::singleValueQuery($sql, CRM_Core_DAO::$_nullArray);
+    $defaultFee3 = CRM_Core_DAO::singleValueQuery($sql);
 
     $event = "INSERT INTO civicrm_event
         ( title, summary, description, event_type_id, participant_listing_id, is_public, start_date, end_date, is_online_registration, registration_link_text, max_participants, event_full_text, is_monetary, financial_type_id, is_map, is_active, fee_label, is_show_location, loc_block_id,intro_text, footer_text, confirm_title, confirm_text, confirm_footer_text, is_email_confirm, confirm_email_text, confirm_from_name, confirm_from_email, cc_confirm, bcc_confirm, default_fee_id, thankyou_title, thankyou_text, thankyou_footer_text, is_pay_later, pay_later_text, pay_later_receipt, is_multiple_registrations, allow_same_participant_emails )
@@ -1548,7 +1548,7 @@ VALUES
         ( 'Summer Solstice Festival Day Concert', 'Festival Day is coming! Join us and help support your parks.', 'We will gather at noon, learn a song all together,  and then join in a joyous procession to the pavilion. We will be one of many groups performing at this wonderful concert which benefits our city parks.', 5, 1, 1, '2011-06-01 12:00:00', '2011-06-01 17:00:00', 1, 'Register Now', 50, 'We have all the singers we can handle. Come to the pavilion anyway and join in from the audience.', 1, 2, NULL, 1, 'Festival Fee', 1, $eventLok2, 'Complete the form below and click Continue to register online for the festival. Or you can register by calling us at 204 222-1000 ext 22.', '', 'Confirm Your Registration Information', '', '', 1, 'This email confirms your registration. If you have questions or need to change your registration - please do not hesitate to call us.', 'Event Dept.', 'events@example.org', '', NULL, {$defaultFee2}, 'Thanks for Your Joining In!', '<p>Thank you for your support. Your participation will help build new parks.</p><p>Please tell your friends and colleagues about the concert.</p>', '<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>', 0, NULL, NULL, 1, 0 ),
         ( 'Rain-forest Cup Youth Soccer Tournament', 'Sign up your team to participate in this fun tournament which benefits several Rain-forest protection groups in the Amazon basin.', 'This is a FYSA Sanctioned Tournament, which is open to all USSF/FIFA affiliated organizations for boys and girls in age groups: U9-U10 (6v6), U11-U12 (8v8), and U13-U17 (Full Sided).', 3, 1, 1, '2011-12-27 07:00:00', '2011-12-29 17:00:00', 1, 'Register Now', 500, 'Sorry! All available team slots for this tournament have been filled. Contact Jill Futbol for information about the waiting list and next years event.', 1, 4, NULL, 1, 'Tournament Fees',1, $eventLok3, 'Complete the form below to register your team for this year''s tournament.', '<em>A Soccer Youth Event</em>', 'Review and Confirm Your Registration Information', '', '<em>A Soccer Youth Event</em>', 1, 'Contact our Tournament Director for eligibility details.', 'Tournament Director', 'tournament@example.org', '', NULL, {$defaultFee3}, 'Thanks for Your Support!', '<p>Thank you for your support. Your participation will help save thousands of acres of rainforest.</p>', '<p><a href=https://civicrm.org>Back to CiviCRM Home Page</a></p>', 0, NULL, NULL, 0, 0 )
          ";
-    CRM_Core_DAO::executeQuery($event, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($event);
   }
 
   public function addParticipant() {
@@ -1619,7 +1619,7 @@ VALUES
 
     $sql = "SELECT DISTINCT(contact_id), id, total_amount from civicrm_contribution LIMIT 200";
 
-    $contriInfo = CRM_Core_DAO::executeQuery($sql, CRM_Core_DAO::$_nullArray);
+    $contriInfo = CRM_Core_DAO::executeQuery($sql);
 
     $prevContactID = NULL;
 
@@ -1646,7 +1646,7 @@ VALUES
        (43, 1, 1, 800.00, 'month', 3, 1, 4, '2010-07-01 10:11:09', '2010-06-23 10:11:14', '2010-06-23 10:11:18', NULL, NULL, '2010-04-01 10:11:40', NULL, NULL, 5, 0),
        (32, 1, 1, 600.00, 'month', 1, 1, 3, '2010-06-01 10:12:35', '2010-05-14 10:12:44', '2010-05-14 10:12:52', NULL, NULL, '2010-08-01 10:13:11', NULL, NULL, 5, 0);
 ";
-    CRM_Core_DAO::executeQuery($pledge, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($pledge);
   }
 
   public function addPledgePayment() {
@@ -1662,7 +1662,7 @@ VALUES
          (3, 13, 200.00, '2010-07-01 10:59:35', '2010-06-28 10:59:41', 1, 1),
          (3, null, 200.00, '2010-08-01 11:00:12', null, 0, 2);
         ";
-    CRM_Core_DAO::executeQuery($pledgePayment, CRM_Core_DAO::$_nullArray);
+    CRM_Core_DAO::executeQuery($pledgePayment);
   }
 
   public function addMembershipPayment() {
@@ -1687,7 +1687,7 @@ VALUES
                 WHERE   contribution_page_id IS NULL AND
                         total_amount = {$amount[$i]} limit 0, 50 ";
 
-      $contributionDAO = CRM_Core_DAO::executeQuery($contributionSQL, CRM_Core_DAO::$_nullArray);
+      $contributionDAO = CRM_Core_DAO::executeQuery($contributionSQL);
 
       while ($contributionDAO->fetch()) {
         $contributionsArray[] = $contributionDAO->id;
@@ -1697,7 +1697,7 @@ VALUES
             SELECT  id
                 FROM  civicrm_membership
                 WHERE civicrm_membership.membership_type_id = {$j} limit 0, 50";
-      $membershipDAO = CRM_Core_DAO::executeQuery($membershipSQL, CRM_Core_DAO::$_nullArray);
+      $membershipDAO = CRM_Core_DAO::executeQuery($membershipSQL);
 
       while ($membershipDAO->fetch()) {
         $membershipArray[] = $membershipDAO->id;
index 9d7fe82c6883068424e1c2b507e4e55e395aad62..3d1a3e6a61e32ec8c6665369ec9087c564679b13 100644 (file)
  +--------------------------------------------------------------------+
 *}
 <div class="help">
-    <p>
+  <p>
     {ts}When migrating a site to a new server, the paths and URLs of your CiviCRM installation may change. {/ts}
-    </p>
-    <p>
+  </p>
+  <p>
     {capture assign="pathsURL"}{crmURL p="civicrm/admin/setting/path" q="reset=1"}{/capture}
     {capture assign="urlsURL"}{crmURL p="civicrm/admin/setting/url" q="reset=1"}{/capture}
     {ts 1=$pathsURL 2=$urlsURL}The old paths and URLs may be retained in some database records. Use this form to clear caches or to reset paths to their defaults. If you need further customizations, then update the <a href="%1">Directories</a> and <a href="%2">Resource URLs</a>.{/ts}
-    </p>
+  </p>
 </div>
 <div class="crm-block crm-form-block crm-config-backend-form-block">
-        <div class="crm-submit-buttons">
-          <span class="crm-button crm-i-button">
-            <i class="crm-i fa-undo"></i>
-            {$form._qf_UpdateConfigBackend_next_cleanup.html}
-          </span>
-          <span class="crm-button crm-i-button">
-            <i class="crm-i fa-terminal"></i>
-            {$form._qf_UpdateConfigBackend_next_resetpaths.html}
-          </span>
-        </div>
-        <div>{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
-<div class="spacer"></div>
+  <div>{include file="CRM/common/formButtons.tpl" location="bottom"}</div>
 </div>
index c18d4d18234694b752a179bc5010be8ceb6f39d4..434ef2939092d744f3dbf24427a76d71c3895311 100644 (file)
@@ -245,7 +245,8 @@ class CRM_Contribute_BAO_ContributionTest extends CiviUnitTestCase {
     );
     $softParam = array('soft_credit_type_id' => 1);
 
-    $honoreeContactId = CRM_Contact_BAO_Contact::createProfileContact($params, CRM_Core_DAO::$_nullArray,
+    $null = [];
+    $honoreeContactId = CRM_Contact_BAO_Contact::createProfileContact($params, $null,
       NULL, NULL, $honoreeProfileId
     );
 
index 4a32122f7101e28a433691a88c0363eb05595774..19ef5bfdf83e9eb12bd41d41a964cc3c4238348a 100644 (file)
@@ -3764,7 +3764,7 @@ class api_v3_ContributionTest extends CiviUnitTestCase {
       'account_relationship' => $relationTypeId,
       'financial_account_id' => 7,
     );
-    CRM_Financial_BAO_FinancialTypeAccount::add($financialParams, CRM_Core_DAO::$_nullArray);
+    CRM_Financial_BAO_FinancialTypeAccount::add($financialParams);
     $this->assertNotEmpty($optionValue['values'][$optionValue['id']]['value']);
     return $optionValue['values'][$optionValue['id']]['value'];
   }