2012-06-18 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_config.php operation/users/user_edit.php godmode/massive/massive_add_action_alerts.php godmode/reporting/reporting_builder.php godmode/reporting/graphs.php: Fixed Php warning due to pass by references variables and improvement in skins update. Merged from branches. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6564 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
d86b4bf2de
commit
d1ba15aa83
|
@ -1,3 +1,14 @@
|
|||
2012-06-18 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* include/functions_config.php
|
||||
operation/users/user_edit.php
|
||||
godmode/massive/massive_add_action_alerts.php
|
||||
godmode/reporting/reporting_builder.php
|
||||
godmode/reporting/graphs.php: Fixed Php warning due to pass by
|
||||
references variables and improvement in skins update.
|
||||
|
||||
Merged from branches.
|
||||
|
||||
2012-06-18 Vanessa Gil <vanessa.gil@artica.es>
|
||||
|
||||
* include/functions_config.php: Don't display
|
||||
|
|
|
@ -110,6 +110,11 @@ if ($add) {
|
|||
|
||||
$groups = users_get_groups ();
|
||||
|
||||
// Avoid php warning
|
||||
if (empty($alert_templates)) {
|
||||
$alert_templates = '';
|
||||
}
|
||||
|
||||
$table->id = 'delete_table';
|
||||
$table->width = '98%';
|
||||
$table->data = array ();
|
||||
|
|
|
@ -48,7 +48,7 @@ switch ($activeTab){
|
|||
case 'main': $buttons['graph_list']['active'] = true;
|
||||
$subsection = ' » '.__('Graph list');
|
||||
break;
|
||||
default: $subsection = reporting_enterprise_add_graph_template_subsection($activeTab, &$buttons);
|
||||
default: $subsection = reporting_enterprise_add_graph_template_subsection($activeTab, $buttons);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -886,7 +886,7 @@ switch ($action) {
|
|||
break;
|
||||
// Added for report templates
|
||||
default:
|
||||
if ($enterpriseEnable){
|
||||
if ($enterpriseEnable) {
|
||||
$buttons = array(
|
||||
'list_reports' => array('active' => false,
|
||||
'text' => '<a href="index.php?sec=reporting&sec2=godmode/reporting/reporting_builder">' .
|
||||
|
|
|
@ -205,12 +205,6 @@ function config_update_config () {
|
|||
config_update_value ('refr', get_parameter('refr', $config['refr']));
|
||||
config_update_value ('vc_refr', get_parameter('vc_refr', $config['vc_refr']));
|
||||
|
||||
config_update_value ('agent_size_text_small', get_parameter('agent_size_text_small', $config['agent_size_text_small']));
|
||||
config_update_value ('agent_size_text_medium', get_parameter('agent_size_text_medium', $config['agent_size_text_medium']));
|
||||
config_update_value ('module_size_text_small', get_parameter('module_size_text_small', $config['module_size_text_small']));
|
||||
config_update_value ('module_size_text_medium', get_parameter('module_size_text_medium', $config['module_size_text_medium']));
|
||||
config_update_value ('description_size_text', get_parameter('description_size_text', $config['description_size_text']));
|
||||
config_update_value ('item_title_size_text', get_parameter('item_title_size_text', $config['item_title_size_text']));
|
||||
|
||||
enterprise_include_once('include/functions_policies.php');
|
||||
$enterprise = enterprise_include_once ('include/functions_skins.php');
|
||||
|
@ -624,9 +618,31 @@ function config_process_config () {
|
|||
}
|
||||
|
||||
if (!isset ($config['relative_path']) && (isset ($_POST['nick']) || isset ($config['id_user'])) && isset($config['enterprise_installed'])) {
|
||||
|
||||
$isFunctionSkins = enterprise_include_once ('include/functions_skins.php');
|
||||
if ($isFunctionSkins !== ENTERPRISE_NOT_HOOK) {
|
||||
if(isset($config['id_user']))
|
||||
|
||||
// Try to update user table in order to refresh skin inmediatly
|
||||
$is_user_updating = get_parameter("sec2", "");
|
||||
|
||||
if ($is_user_updating == 'operation/users/user_edit') {
|
||||
$id = get_parameter_get ("id", $config["id_user"]); // ID given as parameter
|
||||
$user_info = get_user_info ($id);
|
||||
|
||||
//If current user is editing himself or if the user has UM (User Management) rights on any groups the user is part of AND the authorization scheme allows for users/admins to update info
|
||||
if (($config["id_user"] == $id || check_acl ($config["id_user"], users_get_groups ($id), "UM")) && $config["user_can_update_info"]) {
|
||||
$view_mode = false;
|
||||
} else {
|
||||
$view_mode = true;
|
||||
}
|
||||
|
||||
if (isset ($_GET["modified"]) && !$view_mode) {
|
||||
$upd_info["id_skin"] = get_parameter ("skin", $user_info["id_skin"]);
|
||||
$return_update_skin = update_user ($id, $upd_info);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($config['id_user']))
|
||||
$relative_path = enterprise_hook('skins_set_image_skin_path',array($config['id_user']));
|
||||
else
|
||||
$relative_path = enterprise_hook('skins_set_image_skin_path',array($_POST['nick']));
|
||||
|
@ -646,35 +662,11 @@ function config_process_config () {
|
|||
config_update_value ('refr', '');
|
||||
}
|
||||
|
||||
if (!isset($config['agent_size_text_small'])) {
|
||||
config_update_value ('agent_size_text_small', 15);
|
||||
}
|
||||
|
||||
if (!isset($config['agent_size_text_medium'])) {
|
||||
config_update_value ('agent_size_text_medium', 50);
|
||||
}
|
||||
|
||||
if (!isset($config['module_size_text_small'])) {
|
||||
config_update_value ('module_size_text_small', 15);
|
||||
}
|
||||
|
||||
if (!isset($config['module_size_text_medium'])) {
|
||||
config_update_value ('module_size_text_medium', 50);
|
||||
}
|
||||
|
||||
if (!isset($config['description_size_text'])) {
|
||||
config_update_value ('description_size_text', 50);
|
||||
}
|
||||
|
||||
if (!isset($config['item_title_size_text'])) {
|
||||
config_update_value ('item_title_size_text', 40);
|
||||
}
|
||||
|
||||
/* Finally, check if any value was overwritten in a form */
|
||||
config_update_config();
|
||||
}
|
||||
|
||||
function config_check () {
|
||||
function config_check (){
|
||||
global $config;
|
||||
|
||||
// At this first version I'm passing errors using session variables, because the error management
|
||||
|
@ -773,7 +765,7 @@ function config_check () {
|
|||
'no_close' => true, 'force_style' => 'color: #000000 !important'), '', true);
|
||||
}
|
||||
|
||||
pandora_update_manager_login();
|
||||
//pandora_update_manager_login();
|
||||
if (isset($_SESSION['new_update'])) {
|
||||
if (!empty($_SESSION['return_installation_open'])) {
|
||||
if (!$_SESSION['return_installation_open']['return']) {
|
||||
|
|
|
@ -128,12 +128,12 @@ if (isset ($_GET["modified"]) && !$view_mode) {
|
|||
}
|
||||
|
||||
// Reload page to update skin
|
||||
if ($return){
|
||||
/* if ($return){
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=usuarios&sec2=operation/users/user_edit&status=1');
|
||||
}
|
||||
else{
|
||||
header ('location:' . $config['homeurl'] . '/index.php?sec=usuarios&sec2=operation/users/user_edit&status=0');
|
||||
}
|
||||
}*/
|
||||
|
||||
$user_info = $upd_info;
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ $values = array ('Default' =>__('Default'), 'Dashboard'=>__('Dashboard'), 'Visua
|
|||
echo html_print_select($values, 'section', io_safe_output($user_info["section"]), 'show_data_section();', '', -1, true, false, false);
|
||||
echo " ";
|
||||
|
||||
$dashboards = get_user_dashboards ($user_info['id_user']);
|
||||
$dashboards = get_user_dashboards ($config['id_user']);
|
||||
$dashboards_aux = array();
|
||||
if ($dashboards === false) {
|
||||
$dashboards = array('None'=>'None');
|
||||
|
@ -258,7 +258,7 @@ if ($dashboards === false) {
|
|||
}
|
||||
echo html_print_select ($dashboards_aux, 'dashboard', $user_info["data_section"], '', '', '', true);
|
||||
|
||||
$layouts = visual_map_get_user_layouts ($user_info['id_user'], true);
|
||||
$layouts = visual_map_get_user_layouts ($config['id_user'], true);
|
||||
$layouts_aux = array();
|
||||
if ($layouts === false) {
|
||||
$layouts_aux = array('None'=>'None');
|
||||
|
|
Loading…
Reference in New Issue