#11318 added funcion for validate sql when create item
This commit is contained in:
parent
6b17837c4d
commit
25d1b2a5cd
|
@ -2202,7 +2202,7 @@ switch ($action) {
|
|||
$good_format = db_validate_sql($sql);
|
||||
}
|
||||
|
||||
$values['external_source'] = get_parameter('sql');
|
||||
$values['external_source'] = $sql;
|
||||
}
|
||||
|
||||
$values['historical_db'] = get_parameter(
|
||||
|
@ -2939,9 +2939,12 @@ switch ($action) {
|
|||
'id_custom'
|
||||
);
|
||||
if ($values['treport_custom_sql_id'] == 0) {
|
||||
$values['external_source'] = get_parameter(
|
||||
'sql'
|
||||
);
|
||||
$sql = get_parameter('sql', '');
|
||||
if ($sql !== '') {
|
||||
$good_format = db_validate_sql($sql);
|
||||
}
|
||||
|
||||
$values['external_source'] = $sql;
|
||||
}
|
||||
|
||||
$values['historical_db'] = get_parameter(
|
||||
|
|
Loading…
Reference in New Issue