* @todo explain why references are used in function calls
*/
+/** This is the search page */
+define('PAGE_NAME', 'search');
+
/**
* Include the SquirrelMail initialization file.
*/
/* get globals we will need */
sqgetGlobalVar('delimiter', $delimiter, SQ_SESSION);
-if ( sqgetGlobalVar('checkall', $temp, SQ_GET) ) {
- $checkall = (int) $temp;
+if (!sqgetGlobalVar('checkall',$checkall,SQ_GET)) {
+ $checkall = false;
+}
+
+if (!sqgetGlobalVar('preselected', $preselected, SQ_GET) || !is_array($preselected)) {
+ $preselected = array();
+} else {
+ $preselected = array_keys($preselected);
}
/**
$boxes = sqimap_mailbox_list($imapConnection);
/* ensure we have a valid default mailbox name */
$mailbox = asearch_nz($mailbox_array[0]);
-if (($mailbox == '') || ($mailbox == 'None')) //Workaround for sm quirk IMHO (what if I really have a mailbox called None?)
+if ($mailbox == '')
$mailbox = $boxes[0]['unformatted']; //Usually INBOX ;)
$oTemplate->assign('alt_index_colors', isset($alt_index_colors) ? $alt_index_colors: false);
$oTemplate->assign('color', $color);
$oTemplate->assign('align', $align);
+ $oTemplate->assign('checkall', $checkall);
+ $oTemplate->assign('preselected', $preselected);
+
+ global $show_personal_names;
+ $oTemplate->assign('show_personal_names', $show_personal_names);
$oTemplate->display('message_list.tpl');
}
$oTemplate->display('footer.tpl');
sqsession_register($mailbox_cache,'mailbox_cache');
-?>