X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=include%2Fload_prefs.php;h=9ea748fc790f40727a9ace06d65f2b593187ea40;hb=d671df04e4c7b9667dfd43b2236b8ffcffb5f6d7;hp=2774b7cc306f903d6e7c74d1841025a04389c614;hpb=2d6b9047124c4d53e472b13ae13adb31159f68f2;p=squirrelmail.git diff --git a/include/load_prefs.php b/include/load_prefs.php index 2774b7cc..9ea748fc 100644 --- a/include/load_prefs.php +++ b/include/load_prefs.php @@ -32,7 +32,11 @@ $custom_css = getPref($data_dir, $username, 'custom_css', 'none' ); // template set setup // $sDefaultTemplateID = Template::get_default_template_set(); -$sTemplateID = getPref($data_dir, $username, 'sTemplateID', $sDefaultTemplateID); +if (PAGE_NAME == 'squirrelmail_rpc') { + $sTemplateID = Template::get_rpc_template_set(); +} else { + $sTemplateID = getPref($data_dir, $username, 'sTemplateID', $sDefaultTemplateID); +} // load user theme @@ -173,6 +177,7 @@ if( $ser = getPref($data_dir, $username, 'hililist') ) { $message_highlight_list[$i]['match_type'] = $highlight_array[3]; removePref($data_dir, $username, "highlight$i"); } +// NB: The fact that this preference is always set here means that some plugins rely on testing it to know if a user has logged in before - the "old way" above is probably long since obsolete and unneeded, but the setPref() below should not be removed /* store in new format for the next time */ setPref($data_dir, $username, 'hililist', serialize($message_highlight_list)); } @@ -256,6 +261,9 @@ $collapse_folders = $show_html_default = getPref($data_dir, $username, 'show_html_default', SMPREF_ON); +$addrsrch_fullname = + getPref($data_dir, $username, 'addrsrch_fullname', 'fullname'); + $enable_forward_as_attachment = getPref($data_dir, $username, 'enable_forward_as_attachment', SMPREF_ON); @@ -275,6 +283,12 @@ $page_selector = getPref($data_dir, $username, 'page_selector', SMPREF_ON); $compact_paginator = getPref($data_dir, $username, 'compact_paginator', SMPREF_OFF); $page_selector_max = getPref($data_dir, $username, 'page_selector_max', 10); +/* Abook page selector options */ +$abook_show_num = getPref($data_dir, $username, 'abook_show_num', 15 ); +$abook_page_selector = getPref($data_dir, $username, 'abook_page_selector', SMPREF_ON); +$abook_compact_paginator = getPref($data_dir, $username, 'abook_compact_paginator', SMPREF_OFF); +$abook_page_selector_max = getPref($data_dir, $username, 'abook_page_selector_max', 5); + /* SqClock now in the core */ $date_format = getPref($data_dir, $username, 'date_format', 3); $hour_format = getPref($data_dir, $username, 'hour_format', SMPREF_TIME_12HR); @@ -320,6 +334,7 @@ $mailbox_select_style = getPref($data_dir, $username, 'mailbox_select_style', SM /* Allow user to customize, and display the full date, instead of day, or time based on time distance from date of message */ +$custom_date_format = getPref($data_dir, $username, 'custom_date_format', ''); $show_full_date = getPref($data_dir, $username, 'show_full_date', SMPREF_OFF); /* Allow user to customize length of from field */ @@ -381,10 +396,17 @@ do_hook('loading_prefs', $null); // check user prefs template selection against templates actually available // $found_templateset = false; -for ($i = 0; $i < count($aTemplateSet); ++$i){ - if ($aTemplateSet[$i]['ID'] == $sTemplateID) { +if (PAGE_NAME == 'squirrelmail_rpc') { + // RPC skins have no in-memory list + if (is_dir(SM_PATH . Template::calculate_template_file_directory($sTemplateID))) { $found_templateset = true; - break; + } +} else { + for ($i = 0; $i < count($aTemplateSet); ++$i){ + if ($aTemplateSet[$i]['ID'] == $sTemplateID) { + $found_templateset = true; + break; + } } }