fsf changes, meant to be rebased on upstream
[squirrelmail.git] / include / load_prefs.php
index 79cf15990bc773b30e42299917ab911c5a9b5102..38ba78d3a6e7041407d4b027a3b84db511467bfd 100644 (file)
@@ -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-2010 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;
 }
@@ -275,9 +278,15 @@ $attachment_common_show_images = getPref($data_dir, $username, 'attachment_commo
 /* message disposition notification support setting */
 $mdn_user_support = getPref($data_dir, $username, 'mdn_user_support', SMPREF_ON);
 
+$do_not_reply_to_self =
+    getPref($data_dir, $username, 'do_not_reply_to_self', SMPREF_OFF);
+
 $include_self_reply_all =
     getPref($data_dir, $username, 'include_self_reply_all', SMPREF_ON);
 
+$return_to_message_after_reply =
+    getPref($data_dir, $username, 'return_to_message_after_reply', SMPREF_OFF);
+
 /* Page selector options */
 $page_selector = getPref($data_dir, $username, 'page_selector', SMPREF_ON);
 $compact_paginator = getPref($data_dir, $username, 'compact_paginator', SMPREF_OFF);
@@ -348,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
@@ -504,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;
+        }
     }
 }