X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Fload_prefs.php;h=38ba78d3a6e7041407d4b027a3b84db511467bfd;hp=f6753a10ddc73ff0020823b7658cd9f08f4118d3;hb=HEAD;hpb=353d074afac6827c90f4bb03e846c5e453d3b5b1 diff --git a/include/load_prefs.php b/include/load_prefs.php index f6753a10..38ba78d3 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -6,7 +6,7 @@ * Loads preferences from the $username.pref file used by almost * every other script in the source directory and alswhere. * - * @copyright 1999-2018 The SquirrelMail Project Team + * @copyright 1999-2022 The SquirrelMail Project Team * @license http://opensource.org/licenses/gpl-license.php GNU Public License * @version $Id$ * @package squirrelmail @@ -78,6 +78,9 @@ $move_to_trash = $save_as_draft = getPref($data_dir, $username, 'save_as_draft', $default_save_as_draft); +$mark_as_read_upon_delete = + getPref($data_dir, $username, 'mark_as_read_upon_delete', FALSE); + if ($default_unseen_type == '') { $default_unseen_type = 1; } @@ -354,6 +357,7 @@ $truncate_subject = getPref($data_dir, $username, 'truncate_subject', 50); $show_recipient_instead = getPref($data_dir, $username, 'show_recipient_instead', SMPREF_OFF); $delete_prev_next_display = getPref($data_dir, $username, 'delete_prev_next_display', SMPREF_ON); +$return_to_message_list_after_move = getPref($data_dir, $username, 'return_to_message_list_after_move', SMPREF_ON); /** * Access keys @@ -510,16 +514,20 @@ $oTemplate = Template::construct_template($sTemplateID); // need to adjust $chosen_theme path with SM_PATH $chosen_theme_path = preg_replace("/(\.\.\/){1,}/", SM_PATH, $chosen_theme_path); $found_theme = false; -while (!$found_theme && (list($index, $data) = each($user_themes))) { - if ($data['PATH'] == $chosen_theme_path) +foreach ($user_themes as $data) { + if ($data['PATH'] == $chosen_theme_path) { $found_theme = true; + break; + } } if (!$found_theme) { $template_themes = $oTemplate->get_alternative_stylesheets(true); - while (!$found_theme && (list($path, $name) = each($template_themes))) { - if ($path == $chosen_theme_path) + foreach ($template_themes as $path => $name) { + if ($path == $chosen_theme_path) { $found_theme = true; + break; + } } }