Skip to content

Commit

Permalink
Merge branch 'hotfix-verification-cache' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
JimBacon committed Sep 15, 2021
2 parents 98f45de + 65df51d commit 12ec6f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/config/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
*
* @var string
*/
$config['release_date'] = '2021-09-13';
$config['release_date'] = '2021-09-14';

/**
* Link to the code repository downloads page.
Expand Down
5 changes: 4 additions & 1 deletion modules/data_cleaner/models/verification_rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,11 @@ public function updateCache() {
$rule = trim(strtolower(preg_replace('/([A-Z])/', '_$1', $this->test_type)), '_');
require_once MODPATH . "data_cleaner_$rule/plugins/data_cleaner_$rule.php";
if (function_exists("data_cleaner_{$rule}_cache_sql")) {
// Delete old cached values.
$this->db->query("delete from cache_verification_rules_$rule where verification_rule_id=$this->id");
if ($this->deleted === 'f') {
// Only add back to cache if not deleting.
// Note, when importing new rules from file, deleted is null.
if ($this->deleted !== 't') {
$sql = call_user_func("data_cleaner_{$rule}_cache_sql");
$sql = str_replace('#id#', $this->id, $sql);
$this->db->query($sql);
Expand Down

0 comments on commit 12ec6f9

Please sign in to comment.