From 71a9cfed496314dd29e89094e04528119f27f158 Mon Sep 17 00:00:00 2001 From: juanmanuelr Date: Thu, 24 Mar 2011 18:35:10 +0000 Subject: [PATCH] 2011-03-24 Juan Manuel Ramon * include/config_process.php * operation/users/user_edit.php * godmode/users/configure_user.php:Now global configuration for "flash_charts" and "block_size" options are not override for default user values. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4134 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/godmode/users/configure_user.php | 5 ++--- pandora_console/include/config_process.php | 4 ++-- pandora_console/operation/users/user_edit.php | 5 ++--- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index ce9c075d8e..ceddd1a5fe 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-03-24 Juan Manuel Ramon + + * include/config_process.php + * operation/users/user_edit.php + * godmode/users/configure_user.php:Now global configuration for + "flash_charts" and "block_size" options are not override for + default user values. + 2011-03-24 Juan Manuel Ramon * pandoradb.data.postgreSQL.sql: Forgotten file from my last commit. diff --git a/pandora_console/godmode/users/configure_user.php b/pandora_console/godmode/users/configure_user.php index 2cd2030875..294a6f3d24 100644 --- a/pandora_console/godmode/users/configure_user.php +++ b/pandora_console/godmode/users/configure_user.php @@ -310,9 +310,8 @@ if (count($usr_groups) > 1){ } $table->data[11][0] = __('Flash charts'); -$table->data[11][1] = __('Yes').' '.print_radio_button ('flash_charts', 1, '', $user_info["flash_chart"], true).'  '; -$table->data[11][1] .= __('No').' '.print_radio_button ('flash_charts', 0, '', $user_info["flash_chart"], true); - +$values = array(-1 => 'Default',1 => 'Yes',0 => 'No'); +$table->data[11][1] = print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false); $table->data[12][0] = __('Block size for pagination'); $table->data[12][1] = print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true); diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 0665239a9e..1b2b10af17 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -104,9 +104,9 @@ if (isset ($config['id_user'])){ } // If block_size or flash_chart are provided then override global settings - if (!empty($userinfo["block_size"])) + if (!empty($userinfo["block_size"]) && $userinfo["block_size"] != 0) $config["block_size"] = $userinfo["block_size"]; - if (!empty($userinfo["block_size"])) + if (!empty($userinfo["flash_charts"]) && $userinfo["flash_charts"] == -1) $config["flash_charts"] = $userinfo["flash_chart"]; // Each user could have it's own timezone) diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index a70e359708..9a78fc6f14 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -159,9 +159,8 @@ if (count($usr_groups) > 1){ } echo ''.__('Flash charts').''; -echo __('Yes').' '.print_radio_button ('flash_charts', 1, '', $user_info["flash_chart"], true).'  '; -echo __('No').' '.print_radio_button ('flash_charts', 0, '', $user_info["flash_chart"], true); - +$values = array(-1 => __('Default'),1 => __('Yes'),0 => __('No')); +echo print_select($values, 'flash_charts', $user_info["flash_chart"], '', '', -1, true, false, false); echo ''.__('Block size for pagination').''; echo print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true);