diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 272601b03b..761b3c009e 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,10 @@ +2011-02-15 Juan Manuel Ramon + * include/functions_html.php: print_input_image function now uses skins. + * godmode/users/configure_profile.php: Added some variable initialization after + selectinf a defined profile. + + Fixes: #3182041 + 2011-02-05 Javier Lanz * pandora_console/images/wand_sla.png: Added sla wizard tab icon diff --git a/pandora_console/godmode/users/configure_profile.php b/pandora_console/godmode/users/configure_profile.php index 4a3d46aec9..8a5cd592d5 100644 --- a/pandora_console/godmode/users/configure_profile.php +++ b/pandora_console/godmode/users/configure_profile.php @@ -171,7 +171,17 @@ if ($id_profile || $new_profile) { exit; } - + $name = $profile["name"]; + $incident_view = (bool) $profile["incident_view"]; + $incident_edit = (bool) $profile["incident_edit"]; + $incident_management = (bool) $profile["incident_management"]; + $agent_view = (bool) $profile["agent_view"]; + $agent_edit = (bool) $profile["agent_edit"]; + $alert_edit = (bool) $profile["alert_edit"]; + $user_management = (bool) $profile["user_management"]; + $db_management = (bool) $profile["db_management"]; + $alert_management = (bool) $profile["alert_management"]; + $pandora_management = (bool) $profile["pandora_management"]; $id_audit = pandora_audit("User management", "Edit profile ".safe_input($name)); @@ -185,19 +195,6 @@ if ($id_profile || $new_profile) { enterprise_hook('pandora_audit_enterprise', array($id_audit, $info)); - - $name = $profile["name"]; - $incident_view = (bool) $profile["incident_view"]; - $incident_edit = (bool) $profile["incident_edit"]; - $incident_management = (bool) $profile["incident_management"]; - $agent_view = (bool) $profile["agent_view"]; - $agent_edit = (bool) $profile["agent_edit"]; - $alert_edit = (bool) $profile["alert_edit"]; - $user_management = (bool) $profile["user_management"]; - $db_management = (bool) $profile["db_management"]; - $alert_management = (bool) $profile["alert_management"]; - $pandora_management = (bool) $profile["pandora_management"]; - $page_title = __('Update profile'); } diff --git a/pandora_console/include/functions_html.php b/pandora_console/include/functions_html.php index 8bdd09be36..a00f1a8cc5 100644 --- a/pandora_console/include/functions_html.php +++ b/pandora_console/include/functions_html.php @@ -547,9 +547,23 @@ function print_input_text ($name, $value, $alt = '', $size = 50, $maxlength = 25 * @return string HTML code if return parameter is true. */ function print_input_image ($name, $src, $value, $style = '', $return = false, $options = false) { + global $config; static $idcounter = 0; ++$idcounter; + + /* Checks if user's skin is available */ + $isFunctionSkins = enterprise_include_once ('include/functions_skins.php'); + + if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) { + $skin_path = enterprise_hook('get_image_skin_path',array($src)); + if ($skin_path) + $src = $skin_path; + } + + // path to image + $src = $config["homeurl"] . '/' . $src; + $output = '