4.6.18
authork054 <k@fsf.org>
Fri, 10 Jun 2016 20:47:35 +0000 (15:47 -0500)
committerAndrew Engelbrecht <andrew@fsf.org>
Wed, 19 Jul 2017 20:01:51 +0000 (16:01 -0400)
CRM/Contribute/BAO/Contribution.php
CRM/Upgrade/Incremental/sql/4.6.18.mysql.tpl [new file with mode: 0644]
templates/CRM/Contribute/Form/Contribution/OnBehalfOf.tpl

index 4d0f5b6b3b433a51f4d6ee7d0f490ae718567809..0a5cb9e98f9b7d19a3a7ae0584eed4a8b8ea91b8 100644 (file)
@@ -4839,10 +4839,8 @@ LIMIT 1;";
     do {
       $creditNoteNum++;
       $creditNoteId = CRM_Utils_Array::value('credit_notes_prefix', $prefixValue) . "" . $creditNoteNum;
-      $result = civicrm_api3('Contribution', 'getcount', array(
-        'sequential' => 1,
-        'creditnote_id' => $creditNoteId,
-      ));
+      $params = array(1 => array($creditNoteId, 'String'));
+      $result = CRM_Core_DAO::singleValueQuery("SELECT count(id) FROM civicrm_contribution WHERE creditnote_id = %1", $params);
     } while ($result > 0);
 
     return $creditNoteId;
diff --git a/CRM/Upgrade/Incremental/sql/4.6.18.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.6.18.mysql.tpl
new file mode 100644 (file)
index 0000000..09edb02
--- /dev/null
@@ -0,0 +1,4 @@
+{* file to handle db changes in 4.6.18 during upgrade *}
+-- CRM-18516 Convert the date fields relating to group caching and acl caching timestamp
+ALTER TABLE civicrm_group CHANGE cache_date cache_date timestamp NULL DEFAULT NULL , CHANGE refresh_date refresh_date timestamp NULL DEFAULT NULL;
+ALTER TABLE civicrm_acl_cache CHANGE modified_date modified_date timestamp NULL DEFAULT NULL;
index 3b902015a345380ae7dbb78fece3f76ed3a9f07b..02e0c36e9d4482baa9c3930165b6882e060f9cb7 100644 (file)
         else {
           // do not set defaults to file type fields
           if ($('#' + ele).attr('type') != 'file') {
-            $('#' + ele ).val(data[ele].value).change();
+            if (ele.split("_").pop() == 'display') {
+              $("[id^='"+ele+"']").val(data[ele].value).change();
+            }
+            else {
+              $('#' + ele ).val(data[ele].value).change();
+            }
           }
         }
       }