Ejegg has uploaded a new change for review.
https://gerrit.wikimedia.org/r/250491
Change subject: Update references to
civicrm_contribution_recur.next_sched_recur_date to new field name
......................................................................
Update references to civicrm_contribution_recur.next_sched_recur_date to new
field name
Bug: T117152
Change-Id: I486a64eec69dbe6758e3c30c0f9a9b74ca96dfb6
---
M sites/all/modules/queue2civicrm/recurring/recurring.module
M sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
M
sites/all/modules/recurring_globalcollect/recurring_globalcollect_restart_missed.drush.inc
M sites/all/modules/wmf_civicrm/recurring.inc
4 files changed, 9 insertions(+), 9 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm
refs/changes/91/250491/1
diff --git a/sites/all/modules/queue2civicrm/recurring/recurring.module
b/sites/all/modules/queue2civicrm/recurring/recurring.module
index 387f193..263024c 100644
--- a/sites/all/modules/queue2civicrm/recurring/recurring.module
+++ b/sites/all/modules/queue2civicrm/recurring/recurring.module
@@ -227,7 +227,7 @@
// update subscription record with next payment date
$api = civicrm_api_classapi();
$update_params = array(
- 'next_sched_contribution' => wmf_common_date_unix_to_civicrm( strtotime(
"+" . $recur_record->frequency_interval . " " . $recur_record->frequency_unit,
$msg[ 'payment_date' ] )),
+ 'next_sched_contribution_date' => wmf_common_date_unix_to_civicrm(
strtotime( "+" . $recur_record->frequency_interval . " " .
$recur_record->frequency_unit, $msg[ 'payment_date' ] )),
'id' => $recur_record->id,
'version' => 3,
@@ -408,7 +408,7 @@
'frequency_interval' => $msg[ 'frequency_interval' ],
'modified_date' => wmf_common_date_unix_to_civicrm( $msg[ 'modified_date'
] ),
//FIXME: looks wrong to base off of start_date
- 'next_sched_contribution' => wmf_common_date_unix_to_civicrm( strtotime(
"+" . $recur_record->frequency_interval . " " . $recur_record->frequency_unit,
$msg[ 'start_date' ] )),
+ 'next_sched_contribution_date' => wmf_common_date_unix_to_civicrm(
strtotime( "+" . $recur_record->frequency_interval . " " .
$recur_record->frequency_unit, $msg[ 'start_date' ] )),
'version' => 3,
);
diff --git
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
index be97344..3432b12 100644
---
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
+++
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_common.inc
@@ -205,7 +205,7 @@
->fields( array(
'failure_retry_date' => null,
'contribution_status_id' => $contribution_status_id,
- 'next_sched_contribution' => null,
+ 'next_sched_contribution_date' => null,
) )->condition( 'id', $id )->execute();
}
else {
@@ -290,7 +290,7 @@
'failure_count' => 0,
'failure_retry_date' => null,
'contribution_status_id' =>
civicrm_api_contribution_status('Completed'),
- 'next_sched_contribution' => $next_sched_contribution,
+ 'next_sched_contribution_date' => $next_sched_contribution,
) )
->expression( 'processor_id', "processor_id + 1" )
->condition( 'id', $id )
@@ -319,7 +319,7 @@
$cycle_day = isset($record['cycle_day']) ? (integer) $record['cycle_day'] :
false;
$frequency_unit = isset($record['frequency_unit']) ?
$record['frequency_unit'] : false;
$frequency_interval = (integer) $record['frequency_interval'];
- $next_sched_contribution = isset($record['next_sched_contribution']) ?
$record['next_sched_contribution'] : false;
+ $next_sched_contribution = isset($record['next_sched_contribution_date']) ?
$record['next_sched_contribution_date'] : false;
// Make sure $cycle_day is not empty
if (empty($cycle_day)) {
@@ -341,7 +341,7 @@
// Make sure $next_sched_contribution is assigned
if (empty($next_sched_contribution)) {
- $message = 'next_sched_contribution cannot be empty';
+ $message = 'next_sched_contribution_date cannot be empty';
throw new WmfException( 'INVALID_RECURRING', $message, $record );
}
}
diff --git
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_restart_missed.drush.inc
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_restart_missed.drush.inc
index 46cec35..c3f06e2 100644
---
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect_restart_missed.drush.inc
+++
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect_restart_missed.drush.inc
@@ -123,7 +123,7 @@
$query = <<<EOS
SELECT * FROM civicrm_contribution_recur
WHERE
- next_sched_contribution BETWEEN :start AND :end
+ next_sched_contribution_date BETWEEN :start AND :end
AND trxn_id LIKE 'RECURRING GLOBALCOLLECT%'
AND ( end_date IS NULL )
AND contribution_status_id = :status_id
diff --git a/sites/all/modules/wmf_civicrm/recurring.inc
b/sites/all/modules/wmf_civicrm/recurring.inc
index 8af6bcf..45a54e5 100644
--- a/sites/all/modules/wmf_civicrm/recurring.inc
+++ b/sites/all/modules/wmf_civicrm/recurring.inc
@@ -94,7 +94,7 @@
#FIXME:
'processor_id' => 1,
'cycle_day' => $msg[ 'cycle_day' ],
- 'next_sched_contribution' => $next_sched_contribution,
+ 'next_sched_contribution_date' => $next_sched_contribution,
'trxn_id' => $gateway_subscr_id,
'version' => 3,
@@ -215,7 +215,7 @@
$query = <<<EOS
SELECT * FROM civicrm_contribution_recur
WHERE
- civicrm_contribution_recur.next_sched_contribution BETWEEN :start AND :end
+ civicrm_contribution_recur.next_sched_contribution_date BETWEEN :start AND
:end
AND civicrm_contribution_recur.trxn_id LIKE 'RECURRING GLOBALCOLLECT%'
AND ( civicrm_contribution_recur.end_date IS NULL )
AND civicrm_contribution_recur.contribution_status_id = :status_id
--
To view, visit https://gerrit.wikimedia.org/r/250491
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I486a64eec69dbe6758e3c30c0f9a9b74ca96dfb6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: Eileen <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits