1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Add type_id property to filterable

This commit is contained in:
David Bomba 2024-05-16 10:34:38 +10:00
parent 16138adaa7
commit 5d50b77dcc
2 changed files with 4 additions and 1 deletions

View File

@ -169,6 +169,9 @@ class ImportController extends Controller
$enc = mb_detect_encoding($data, mb_list_encodings(), true);
nlog("env");
nlog($enc);
if($enc !== false) {
$data = mb_convert_encoding($data, "UTF-8", $enc);
}

View File

@ -126,7 +126,7 @@ class TemplateService
$allowedTags = ['if', 'for', 'set', 'filter'];
$allowedFilters = ['escape', 'e', 'upper', 'lower', 'capitalize', 'filter', 'length', 'merge','format_currency','map', 'join', 'first', 'date','sum'];
$allowedFunctions = ['range', 'cycle', 'constant', 'date',];
$allowedProperties = [];
$allowedProperties = ['type_id'];
$allowedMethods = ['img','t'];
$policy = new \Twig\Sandbox\SecurityPolicy($allowedTags, $allowedFilters, $allowedFunctions, $allowedProperties, $allowedMethods);