mirror of
https://github.com/webmin/webmin.git
synced 2026-06-20 19:30:30 +01:00
Transfer 'query' field into table, selection and where if possible
This commit is contained in:
@@ -2078,6 +2078,12 @@ else {
|
||||
local $v = &get_real_value($value."_".$k);
|
||||
$conf->{$k} = $v;
|
||||
}
|
||||
if ($conf->{'query'} =~ /^select\s+(\S+)\s+from\s+(\S+)\s+where\s+(\S+)\s+=\s+'\%s'/i && !$conf->{'table'}) {
|
||||
# Try to extract table and fields from the query
|
||||
$conf->{'select_field'} = $1;
|
||||
$conf->{'table'} = $2;
|
||||
$conf->{'where_field'} = $3;
|
||||
}
|
||||
}
|
||||
return $conf;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user