Eileen has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249333

Change subject: Initialize CiviCRM before calling api functions in upgrade
......................................................................

Initialize CiviCRM before calling api functions in upgrade

I'm fairly tempted to add a wrapper function to the api in wmf_civicrm & parse 
all api calls through it - the wrapper would
a) ensure civicrm_intialize() has been called & b) ensure that WmfExceptions 
are always thrown

Bug: T1760323
Change-Id: Ia8f7f058124b0dac96c37bc2685d13921bab40ac
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/33/249333/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 8953be8..46653c0 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -1484,6 +1484,7 @@
  * @throws \CiviCRM_API3_Exception
  */
 function wmf_civicrm_update_7062() {
+    civicrm_initialize();
     civicrm_api3('Setting', 'create', array(
         'contact_default_language' => "undefined",
     ));
@@ -1497,6 +1498,7 @@
  * @throws \CiviCRM_API3_Exception
  */
 function wmf_civicrm_update_7063() {
+    civicrm_initialize();
     civicrm_api3('Navigation', 'reset', array(
       'for' => "report",
     ));

-- 
To view, visit https://gerrit.wikimedia.org/r/249333
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8f7f058124b0dac96c37bc2685d13921bab40ac
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9
Gerrit-Owner: Eileen <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to