Closed AlanBCole closed 2 years ago
Do not merge code before you run tests. Do the following when you have completed work on this PR and all of you reviewers have approved it:
While testing this again today, I noticed that the cache was never being emptied as expected. Apparently there is an issue with setting an expiration time in cache_set()
. Basically, it doesn't do anything. (look here too -> https://api.drupal.org/api/drupal/includes%21cache.inc/function/cache_set/7.x#comment-58038)
Given the date of the comment linked to above, the rave_alerts module may have not been working 100% as expected for some years. Please do not merge this PR until I fix this as well.
Now the data flow is:
This seems like a decent replacement of the original code (see comments in #842), preserving its focus on the CLEAR token instead of the ACTIVE token. In the original code an alert was shown unless there was a CLEAR token in the title. The ACTIVE token was also searched for but that was not the condition that triggered an alert's display.
With these changes a [CLEAR] token should turn alerts off and its absence will 'turn on' an alert and log it. If there is an [ACTIVE] token there is an additional log entry and the setting
rave_alerts_active_event = 1
.