diff --git a/pandora_console/include/functions_api.php b/pandora_console/include/functions_api.php index 92dea6bfd8..8cc6290ca6 100644 --- a/pandora_console/include/functions_api.php +++ b/pandora_console/include/functions_api.php @@ -366,23 +366,30 @@ function api_get_groups($thrash1, $thrash2, $other, $returnType, $user_in_db) $returnAllGroup = true; $returnAllColumns = false; - if (isset($other['data'][1])) + if (isset($other['data'][1])) { $returnAllGroup = ( $other['data'][1] == '1' ? true : false); - - if (isset($other['data'][2])) - $returnAllColumns = ( $other['data'][2] == '1' ? true : false); + } - $groups = users_get_groups ($user_in_db, "IR", $returnAllGroup, $returnAllColumns); + if (isset($other['data'][2])) { + $returnAllColumns = ( $other['data'][2] == '1' ? true : false); + } - $data_groups = array(); - foreach ($groups as $id => $group) { - $data_groups[] = array($id, $group); - } + $groups = users_get_groups($user_in_db, 'IR', $returnAllGroup, $returnAllColumns); - if (!isset($other['data'][0])) - $separator = ';'; // by default - else - $separator = $other['data'][0]; + $data_groups = []; + foreach ($groups as $id => $group) { + $data_groups[] = [ + $id, + $group, + ]; + } + + if (!isset($other['data'][0])) { + $separator = ';'; + // by default + } else { + $separator = $other['data'][0]; + } $data['type'] = 'array'; $data['data'] = $data_groups; diff --git a/pandora_console/include/functions_config.php b/pandora_console/include/functions_config.php index f0163384ba..b4977be3d3 100644 --- a/pandora_console/include/functions_config.php +++ b/pandora_console/include/functions_config.php @@ -2843,7 +2843,7 @@ function config_check() ); } - $result_ejecution = exec($config['phantomjs_bin'].'/phantomjs --version'); + $result_ejecution = exec('"'.io_safe_output($config['phantomjs_bin']).'/phantomjs" --version'); if (!isset($result_ejecution) || $result_ejecution == '') { if ($config['language'] == 'es') { set_pandora_error_for_header( diff --git a/pandora_console/install.php b/pandora_console/install.php index 92b6dd1217..7a0c15c766 100644 --- a/pandora_console/install.php +++ b/pandora_console/install.php @@ -128,8 +128,8 @@