2011-02-15 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* 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 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3837 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
4d59fca33a
commit
ccec340eaf
|
@ -1,3 +1,10 @@
|
|||
2011-02-15 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
* 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 <javier.lanz@artica.es>
|
||||
* pandora_console/images/wand_sla.png: Added sla wizard tab icon
|
||||
|
||||
|
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
@ -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 = '<input id="image-'.$name.$idcounter.'" src="'.$src.'" style="'.$style.'" name="'.$name.'" type="image"';
|
||||
|
||||
//Valid attributes (invalid attributes get skipped)
|
||||
|
@ -1094,6 +1108,7 @@ function print_image ($src, $return = false, $options = false) {
|
|||
if ($skin_path)
|
||||
$src = $skin_path;
|
||||
}
|
||||
|
||||
// path to image
|
||||
$src = $config["homeurl"] . '/' . $src;
|
||||
|
||||
|
|
Loading…
Reference in New Issue