View | Details | Raw Unified | Return to bug 32613
Collapse All | Expand All

(-)a/reports/guided_reports.pl (-1 / +4 lines)
Lines 1036-1041 sub header_cell_loop { Link Here
1036
#get a list of available tables for auto-complete
1036
#get a list of available tables for auto-complete
1037
sub get_tables {
1037
sub get_tables {
1038
    my $result = {};
1038
    my $result = {};
1039
    my $cache  = Koha::Caches->get_instance();
1040
    my $tables = $cache->get_from_cache("Reports-SQL_tables-for-autocomplete");
1041
    return $tables if $tables;
1039
    my $tables = C4::Reports::Guided->get_all_tables();
1042
    my $tables = C4::Reports::Guided->get_all_tables();
1040
    for my $table (@{$tables}) {
1043
    for my $table (@{$tables}) {
1041
        my $sql = "SHOW COLUMNS FROM $table";
1044
        my $sql = "SHOW COLUMNS FROM $table";
Lines 1044-1049 sub get_tables { Link Here
1044
            push @{$result->{$table}}, $row->{Field};
1047
            push @{$result->{$table}}, $row->{Field};
1045
        }
1048
        }
1046
    }
1049
    }
1050
    $cache->set_in_cache("Reports-SQL_tables-for-autocomplete",$result);
1047
    return $result;
1051
    return $result;
1048
}
1052
}
1049
1053
1050
- 

Return to bug 32613