// 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
$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));
}
getPref($data_dir, $username, 'show_html_default', SMPREF_ON);
$addrsrch_fullname =
- getPref($data_dir, $username, 'addrsrch_fullname', SMPREF_ON);
+ getPref($data_dir, $username, 'addrsrch_fullname', 'fullname');
$enable_forward_as_attachment =
getPref($data_dir, $username, 'enable_forward_as_attachment', SMPREF_ON);
// 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;
+ }
}
}