[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Enable CiviCampaign.

2017-06-19 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/350361 )

Change subject: Enable CiviCampaign.
..


Enable CiviCampaign.

Bug: T161758
Change-Id: Ie1d472ef4de3b3a45d9d74de11d66ea5a076253b
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 24 insertions(+), 7 deletions(-)

Approvals:
  jenkins-bot: Verified
  Ejegg: Looks good to me, approved



diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 08f8cb4..1a3d860 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -66,6 +66,7 @@
 wmf_civicrm_update_7460();
 wmf_civicrm_update_7521();
 wmf_civicrm_update_7524();
+wmf_civicrm_update_7525();
 }
 
 /**
@@ -2089,9 +2090,9 @@
   civicrm_initialize();
   CRM_Core_DAO::executeQuery("
 UPDATE civicrm_contribution_recur
-SET 
-  failure_retry_date = NULL, 
-  failure_count = 0, 
+SET
+  failure_retry_date = NULL,
+  failure_count = 0,
   next_sched_contribution_date = '2010-10-01',
   contribution_status_id = 5
 
@@ -3010,13 +3011,29 @@
   * Add duplicate contribution tag
   */
 function wmf_civicrm_update_7524() {
- civicrm_initialize();
- $tag = array(
+  civicrm_initialize();
+  $tag = array(
 'name' => 'DuplicateInvoiceId',
 'used_for' => 'civicrm_contribution',
 'description' => 'Used for contributions where the original assigned 
invoice id was a duplicate with another already in the database',
 'is_reserved' => 1, //WIP: What does this mean?
 'selectable' => 0,
- );
- civicrm_api3('Tag', 'Create', $tag);
+  );
+  civicrm_api3('Tag', 'Create', $tag);
+}
+
+/**
+ * Enable CiviCampaign.
+ */
+function wmf_civicrm_update_7525() {
+  wmf_civicrm_bootstrap_civi();
+  $components = civicrm_api3('Setting', 'getvalue', array(
+'name' => "enable_components",
+  ));
+  if (isset($components['is_error'])) {
+// weirdness.
+unset($components['is_error']);
+  }
+  $components[] = 'CiviCampaign';
+  civicrm_api3('Setting', 'create', array('enable_components' => $components));
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1d472ef4de3b3a45d9d74de11d66ea5a076253b
Gerrit-PatchSet: 5
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Enable CiviCampaign.

2017-04-25 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/350361 )

Change subject: Enable CiviCampaign.
..

Enable CiviCampaign.

Bug: T161758
Change-Id: Ie1d472ef4de3b3a45d9d74de11d66ea5a076253b
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 17 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/61/350361/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 099d8c9..aa9bc71 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -64,6 +64,7 @@
 wmf_civicrm_update_7310();
 wmf_civicrm_update_7455();
 wmf_civicrm_update_7460();
+wmf_civicrm_update_7525();
 }
 
 /**
@@ -2977,3 +2978,19 @@
 }
   }
 }
+
+/**
+ * Enable CiviCampaign.
+ */
+function wmf_civicrm_update_7525() {
+  wmf_civicrm_bootstrap_civi();
+  $components = civicrm_api3('Setting', 'getvalue', array(
+'name' => "enable_components",
+  ));
+  if (isset($components['is_error'])) {
+// weirdness.
+unset($components['is_error']);
+  }
+  $components[] = 'CiviCampaign';
+  civicrm_api3('Setting', 'create', array('enable_components' => $components));
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1d472ef4de3b3a45d9d74de11d66ea5a076253b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits