Skip to content
Snippets Groups Projects
Commit f1ea47b7 authored by Dan Ruscoe's avatar Dan Ruscoe
Browse files

Use cached list only if interest group requirement is met.

parent 0f64a940
No related branches found
Tags 7.x-4.8
No related merge requests found
......@@ -190,7 +190,10 @@ function mailchimp_get_api_object($classname = 'Mailchimp', $api_key = NULL) {
function mailchimp_get_list($list_id, $use_interest_groups = TRUE, $reset = FALSE) {
$cache = $reset ? NULL : cache_get('list-' . $list_id, 'cache_mailchimp');
if (!empty($cache)) {
return $cache->data;
// Use cached list only if interest group requirement is met.
if (!$use_interest_groups || ($use_interest_groups && isset($cache->data->intgroups))) {
return $cache->data;
}
}
$list = NULL;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment