From 539c5cf0c75994db2685d0538854bc78e52700a9 Mon Sep 17 00:00:00 2001 From: Thomas Zilio Date: Fri, 22 Dec 2017 11:55:55 +0100 Subject: [PATCH] Fix di un problema con gli apici --- modules/viste/edit.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/viste/edit.php b/modules/viste/edit.php index 2b973129e..e5bd9ead3 100644 --- a/modules/viste/edit.php +++ b/modules/viste/edit.php @@ -44,13 +44,14 @@ echo '
- {[ "type": "textarea", "label": "'.tr('Query di default').'", "name": "options", "value": "'.str_replace(']}', '] }', $record['options']).'", "readonly": "1", "class": "autosize" ]} + {[ "type": "textarea", "label": "'.tr('Query di default').'", "name": "options", "value": '.json_encode(str_replace(']}', '] }', $record['options'])).', "readonly": "1", "class": "autosize" ]}
- {[ "type": "textarea", "label": "'.tr('Query personalizzata').'", "name": "options2", "value": "'.str_replace(']}', '] }', $record['options2']).'", "class": "autosize", "help": "'.tr('La query in sostituzione a quella di default: custom, menu oppure SQL').'" ]} + {[ "type": "textarea", "label": "'.tr('Query personalizzata').'", "name": "options2", "value": '.json_encode(str_replace(']}', '] }', $record['options2'])).', "class": "autosize", "help": "'.tr('La query in sostituzione a quella di default: custom, menu oppure SQL').'" ]}
-
'; + '; + if ($options != '' && $options != 'menu' && $options != 'custom') { $total = Modules::getQuery($id_record); $module_query = $total['query'];