}
create_non_existing_group_and_subgroup($input, $group, $subgroup);
-
## FIXME this is AFTER entering a name to save the report under
if ($sql =~ /;?\W?(UPDATE|DELETE|DROP|INSERT|SHOW|CREATE)\W/i) {
push @errors, {sqlerr => $1};
cache_expiry => $cache_expiry,
public => $public,
} );
-
logaction( "REPORTS", "ADD", $id, "$name | $sql" ) if C4::Context->preference("ReportsLog");
$template->param(
'save_successful' => 1,
sub create_non_existing_group_and_subgroup {
my ($input, $group, $subgroup) = @_;
-
if (defined $group and $group ne '') {
my $report_groups = C4::Reports::Guided::get_report_groups;
if (not exists $report_groups->{$group}) {
authorised_value => $group,
lib => $groupdesc,
})->store;
+ my $cache_key = "AuthorisedValues-REPORT_GROUP-0-".C4::Context->userenv->{"branch"};
+ my $cache = Koha::Caches->get_instance();
+ my $result = $cache->clear_from_cache($cache_key);
}
if (defined $subgroup and $subgroup ne '') {
if (not exists $report_groups->{$group}->{subgroups}->{$subgroup}) {
lib => $subgroupdesc,
lib_opac => $group,
})->store;
+ my $cache_key = "AuthorisedValues-REPORT_SUBGROUP-0-".C4::Context->userenv->{"branch"};
+ my $cache = Koha::Caches->get_instance();
+ my $result = $cache->clear_from_cache($cache_key);
}
}
}