From 5e495dc6532896f17e37753813732a14e9163657 Mon Sep 17 00:00:00 2001 From: zarzuelo Date: Mon, 8 Aug 2011 11:20:56 +0000 Subject: [PATCH] 2011-08-08 Sergio Martin * include/config_process.php operation/users/user_edit.php godmode/setup/setup_visuals.php: Fixed global block size edition and user config default block size setting for bug 3388207 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4679 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 +++++ .../godmode/setup/setup_visuals.php | 2 +- pandora_console/include/config_process.php | 3 ++ pandora_console/operation/users/user_edit.php | 34 ++++++++++++++++++- 4 files changed, 45 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index a06cd009ae..222e739bbb 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2011-08-08 Sergio Martin + + * include/config_process.php + operation/users/user_edit.php + godmode/setup/setup_visuals.php: Fixed global block size + edition and user config default block size setting + for bug 3388207 + 2011-08-08 Juan Manuel Ramon * images/skin/skin_default/include/styles/pandora.css include/styles/pandora.css: pagination margin is very small in some diff --git a/pandora_console/godmode/setup/setup_visuals.php b/pandora_console/godmode/setup/setup_visuals.php index 2c5b909744..51c89cfdd5 100644 --- a/pandora_console/godmode/setup/setup_visuals.php +++ b/pandora_console/godmode/setup/setup_visuals.php @@ -64,7 +64,7 @@ $table->data[6][0] = __('Style template'); $table->data[6][1] = html_print_select (themes_get_css (), 'style', $config["style"].'.css', '', '', '', true); $table->data[7][0] = __('Block size for pagination'); -$table->data[7][1] = html_print_input_text ('block_size', $config["block_size"], '', 5, 5, true); +$table->data[7][1] = html_print_input_text ('block_size', $config["global_block_size"], '', 5, 5, true); $table->data[8][0] = __('Use round corners'); $table->data[8][1] = __('Yes').' '.html_print_radio_button ('round_corner', 1, '', $config["round_corner"], true).'  '; diff --git a/pandora_console/include/config_process.php b/pandora_console/include/config_process.php index 41f240e5d9..126ce40344 100644 --- a/pandora_console/include/config_process.php +++ b/pandora_console/include/config_process.php @@ -95,6 +95,9 @@ if ((!isset($config["timezone"])) OR ($config["timezone"] == "")){ date_default_timezone_set($config["timezone"]); +// Save the global block size +$config["global_block_size"] = $config["block_size"]; + if (isset ($config['id_user'])){ $userinfo = get_user_info ($config['id_user']); diff --git a/pandora_console/operation/users/user_edit.php b/pandora_console/operation/users/user_edit.php index 89183915b0..290faa1bc9 100644 --- a/pandora_console/operation/users/user_edit.php +++ b/pandora_console/operation/users/user_edit.php @@ -57,6 +57,11 @@ if (isset ($_GET["modified"]) && !$view_mode) { $upd_info["language"] = get_parameter_post ("language", $user_info["language"]); $upd_info["id_skin"] = get_parameter ("skin", $user_info["id_skin"]); $upd_info["block_size"] = get_parameter ("block_size", $config["block_size"]); + $default_block_size = get_parameter ("default_block_size", 0); + if($default_block_size) { + $upd_info["block_size"] = 0; + } + $upd_info["flash_chart"] = get_parameter ("flash_charts", $config["flash_charts"]); if ( !empty ($password_new)) { @@ -164,7 +169,16 @@ echo ''.__('Flash charts').''.__('Block size for pagination').''; -echo html_print_input_text ('block_size', $user_info["block_size"], '', 5, 5, true); +if($user_info["block_size"] == 0) { + $block_size = $config["global_block_size"]; +} +else { + $block_size = $user_info["block_size"]; +} + +echo html_print_input_text ('block_size', $block_size, '', 5, 5, true); +echo html_print_checkbox('default_block_size', 1, $user_info["block_size"] == 0, true); +echo __('Default').' ('.$config["global_block_size"].')'; echo ''; @@ -209,3 +223,21 @@ if (!empty ($table->data)) { echo '
'.__('This user doesn\'t have any assigned profile/group').'
'; } ?> + +