X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=include%2Fload_prefs.php;h=410ec472db83a92c8b958c51976e4c12021079f2;hp=e9c7e647503faffd3834cdc36dcb00f2c07e4eda;hb=8fb266133c06744221221b111c66b831b8c5a08c;hpb=1f16606e5d9bf427b3fa1857057886739f55f731;ds=sidebyside diff --git a/include/load_prefs.php b/include/load_prefs.php index e9c7e647..410ec472 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -158,15 +158,26 @@ $left_refresh = strtolower($left_refresh); $sort = getPref($data_dir, $username, 'sort', 6 ); /** Load up the Signature file **/ -$signature_abs = $signature = getSig($data_dir, $username, "g"); - -/* Highlight comes in with the form: name, color, header, value. */ -for ($i = 0; $hlt = getPref($data_dir, $username, "highlight$i"); ++$i) { - $highlight_array = explode(',', $hlt); - $message_highlight_list[$i]['name'] = $highlight_array[0]; - $message_highlight_list[$i]['color'] = $highlight_array[1]; - $message_highlight_list[$i]['value'] = $highlight_array[2]; - $message_highlight_list[$i]['match_type'] = $highlight_array[3]; +$signature_abs = $signature = getSig($data_dir, $username, 'g'); + +/* Message Highlighting Rules */ +$message_highlight_list = array(); + +/* use new way of storing highlighting rules */ +if( $ser = getPref($data_dir, $username, 'hililist') ) { + $message_highlight_list = unserialize($ser); +} else { + /* use old way */ + for ($i = 0; $hlt = getPref($data_dir, $username, "highlight$i"); ++$i) { + $highlight_array = explode(',', $hlt); + $message_highlight_list[$i]['name'] = $highlight_array[0]; + $message_highlight_list[$i]['color'] = $highlight_array[1]; + $message_highlight_list[$i]['value'] = $highlight_array[2]; + $message_highlight_list[$i]['match_type'] = $highlight_array[3]; + removePref($data_dir, $user_name, "highlight$i"); + } + /* store in new format for the next time */ + setPref($data_dir, $username, 'hililist', serialize($message_highlight_list)); } /* Index order lets you change the order of the message index */ @@ -244,6 +255,8 @@ $search_memory = getPref($data_dir, $username, 'search_memory', 0); $forward_cc = getPref($data_dir, $username, 'forward_cc', 0); +$mailbox_select_style = getPref($data_dir, $username, 'mailbox_select_style', 0); + do_hook('loading_prefs'); ?>