From 78761727d7c150c273b1ff9172d3b88c132aa472 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Mon, 31 Mar 2014 14:17:41 +0000 Subject: [PATCH] 2014-03-31 Miguel de Dios * godmode/servers/plugin.php: fixed the plugins server without parameters. Incident: #703 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@9683 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 7 ++ pandora_console/godmode/servers/plugin.php | 95 ++++++++++++---------- 2 files changed, 57 insertions(+), 45 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 350b294711..263d7a46f8 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2014-03-31 Miguel de Dios + + * godmode/servers/plugin.php: fixed the plugins server without + parameters. + + Incident: #703 + 2014-03-31 Miguel de Dios * godmode/agentes/agent_conf_gis.php, diff --git a/pandora_console/godmode/servers/plugin.php b/pandora_console/godmode/servers/plugin.php index 9c40eaecb4..45aa3715b7 100644 --- a/pandora_console/godmode/servers/plugin.php +++ b/pandora_console/godmode/servers/plugin.php @@ -134,6 +134,8 @@ if ($filemanager) { // END FILEMANAGER // ===================================================================== + +// ===================================================================== // SHOW THE FORM // ===================================================================== @@ -147,16 +149,18 @@ if (($create != "") OR ($view != "")) { } else { if ($create != "") - ui_print_page_header (__('Plugin creation'), "images/gm_servers.png", false, "plugin_definition", true); + ui_print_page_header(__('Plugin creation'), + "images/gm_servers.png", false, "plugin_definition", true); else { - ui_print_page_header (__('Plugin update'), "images/gm_servers.png", false, "plugin_definition", true); + ui_print_page_header(__('Plugin update'), + "images/gm_servers.png", false, "plugin_definition", true); } } - + enterprise_hook('open_meta_frame'); - + if ($create == "") { - $plugin_id = get_parameter ("view",""); + $plugin_id = get_parameter ("view", ""); echo "
"; } else { @@ -184,7 +188,7 @@ if (($create != "") OR ($view != "")) { $data[1] = html_print_select ($fields, "form_plugin_type", $form_plugin_type, '', '', 0, true); $table->data['plugin_type'] = $data; $table->colspan['plugin_type'][1] = 3; - + $data[0] = __('Max. timeout').ui_print_help_tip (__('This value only will be applied if is minor than the server general configuration plugin timeout').'.

'.__('If you set a 0 seconds timeout, the server plugin timeout will be used'), true); $data[1] = html_print_extended_select_for_time ('form_max_timeout', $form_max_timeout, '', '', '0', false, true); $data[2] = __('Max. retries'); @@ -251,11 +255,11 @@ if (($create != "") OR ($view != "")) { $data[0] = __('Command preview'); $data[1] = '
'; $table->data['plugin_preview'] = $data; - + echo '
'.__('Command').''; html_print_table($table); echo '
'; - + $data = array(); $table->data = array (); @@ -306,11 +310,11 @@ if (($create != "") OR ($view != "")) { } $table->data['plugin_'.$next_name_number] = $datam; - + $next_name_number++; $table->colspan['plugin_'.$next_name_number][1] = 3; - + $datam = array (); $datam[0] = __('Help')." ($macro_name)


"; $tadisabled = $locked === true ? ' disabled' : ''; @@ -438,7 +442,7 @@ else { $plugin_max_retries = get_parameter ("form_max_retries", ""); $plugin_execute = get_parameter ("form_execute", ""); $plugin_plugin_type = get_parameter ("form_plugin_type", "0"); - $plugin_parameters = get_parameter ("form_parameters", "0"); + $plugin_parameters = get_parameter ("form_parameters", ""); // Get macros $i = 1; @@ -513,7 +517,8 @@ else { echo "" . __('Name') . ""; echo "" . __('Type') . ""; echo "" . __('Command') . ""; - echo "" . '' . __('Op.') . '' . ""; + echo "" . + '' . __('Op.') . '' . ""; $color = 0; foreach ($rows as $row) { @@ -562,45 +567,45 @@ ui_require_javascript_file('pandora_modules'); ?>