- Added smtp_auth hook
- Removed "Include CCs when Forwarding Messages", which had no functionality
whatsoever.
+ - Added "preselected" query argument to mailbox list.
Version 1.5.1 (branched on 2006-02-12)
--------------------------------------
function prepareMessageList(&$aMailbox, $aProps) {
/* Globalize link attributes so plugins can share in modifying them */
- global $link, $title, $target, $onclick, $link_extra;
+ global $link, $title, $target, $onclick, $link_extra, $preselected;
/* retrieve the properties */
$my_email_address = (isset($aProps['email'])) ? $aProps['email'] : false;
$value = (is_array($value) && $value[0] == 'multipart' && $value[1] == 'mixed') ? true : false;
break;
case SQM_COL_CHECK:
- $value = $checkall;
+ $value = ($checkall || in_array($iUid, $preselected));
break;
default : break;
}
$checkall = false;
}
+if (!sqgetGlobalVar('preselected', $preselected, SQ_GET) || !is_array($preselected)) {
+ $preselected = array();
+} else {
+ $preselected = array_keys($preselected);
+}
+
/* future work */
if ( sqgetGlobalVar('account', $account, SQ_GET) ) {
$account = (int) $account;
$oTemplate->assign('color', $color);
$oTemplate->assign('align', $align);
$oTemplate->assign('checkall', $checkall);
+ $oTemplate->assign('preselected', $preselected);
$oTemplate->display('message_list.tpl');
* $compact_paginator
* $aErrors
* $checkall
+ * $preselected
*
* @copyright © 1999-2006 The SquirrelMail Project Team
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
$aColumns[SQM_COL_ATTACHMENT]['value'] = $sValue;
}
- $class = ($checkall && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even');
+ $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_even' : 'even');
$non_clicked_class = 'even';
/**
*/
if (isset($alt_index_colors) && $alt_index_colors) {
if (!($i % 2)) {
- $class = ($checkall && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd');
+ $class = (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite ? 'clicked_odd' : 'odd');
$non_clicked_class = 'odd';
}
*/
if (isset($aMsg['row']['color']))
{
- if ($checkall && $javascript_on && $fancy_index_highlite) {
+ if (($checkall || in_array($iUid, $preselected)) && $javascript_on && $fancy_index_highlite) {
//FIXME: would be best not to use $color directly here; want to move this to be a CSS style-defined value only, but the problem is that this CSS class is being defined on the fly right here
$bgcolor = $color[16];
$class = 'clicked_misc'.$i;
switch ($iCol) {
case SQM_COL_CHECK:
- $checked = ($checkall ? ' checked="checked" ' : '');
+ $checked = (($checkall || in_array($iUid, $preselected)) ? ' checked="checked" ' : '');
if ($javascript_on) {
echo '<td class="col_check"'. $javascript_auto_click. '>' ?>
<input type="checkbox" name="<?php echo "msg[$i]";?>" id="<?php echo $form_id."_msg$i";?>" value="<?php echo $iUid;?>" <?php echo $checkbox_javascript . $checked;?> /></td>