' . // 1st level ul
'' . _("matching any one of the Spam tests as follows:"). '';
$terse .= '
' . _("Spam Tests:") . '';
foreach($tests as $test=>$val) {
foreach($spamrule_tests as $group=>$data) {
if(array_key_exists($test, $data['available'])) {
$text .= '- ' . $data['available'][$test]. ' = '.
( is_array($val) ? implode(' | ', $val) : $val ). '
';
$terse .= '- ' . $data['available'][$test].'
';
break;
}
}
}
$text .= '
';
$terse .= '
';
if(isset($whitelistRef)) {
$text .= '' . _("and where the sender does not match any of the addresses / expressions in your Whitelist") . '';
}
$text .= ''; // 1st level ul
} else {
/* Simple textual description for default rule. */
$text .= _("The messages that match the system's default SPAM checks");
}
/* ------------------------ 'then' ------------------------ */
$text .= ' ' . _("will be") . ' ';
$terse .= '';
/* FIXME - Temporary Copy/Paste kludge */
switch($rule['action']) {
/* Added */
case '7': /* junk folder */
$out .= 'fileinto "INBOX.Junk";';
$text .= _("stored in the Junk Folder.");
$terse .= _("Junk");
break;
case '8': /* junk folder */
$text .= _("stored in the Trash Folder.");
global $data_dir, $username;
$trash_folder = getPref($data_dir, $username, 'trash_folder');
/* Fallback in case it does not exist. Thanks to Eduardo
* Mayoral. If not even Trash does not exist, it will end up in
* INBOX... */
if($trash_folder == '' || $trash_folder == 'none') {
$trash_folder = "Trash";
}
$out .= 'fileinto "'.$trash_folder.'";';
$terse .= _("Trash");
break;
}
return(array($out,$text,$terse));
}
|