Fixed get_plugins API that had returned values in wrong order if updated from ver 4.x.

This commit is contained in:
Hirofumi Kosaka 2016-02-18 16:55:16 +09:00
parent e74f76848d
commit e44ba856ee
1 changed files with 7 additions and 1 deletions

View File

@ -3489,8 +3489,14 @@ function api_get_plugins($thrash1, $thrash2, $other, $thrash3) {
$separator = $other['data'][0]; $separator = $other['data'][0];
$filter = false; $filter = false;
$field_list = array( 'id', 'name', 'description',
'max_timeout', 'max_retries',
'execute', 'net_dst_opt',
'net_port_opt', 'user_opt',
'pass_opt', 'plugin_type',
'macros', 'parameters');
$plugins = @db_get_all_rows_filter ('tplugin', $filter); $plugins = @db_get_all_rows_filter ('tplugin', $filter, $field_list);
if ($plugins !== false) { if ($plugins !== false) {
$data['type'] = 'array'; $data['type'] = 'array';