Wbl bugfix
This commit is contained in:
parent
8f677cca9d
commit
3addb56e91
@ -295,6 +295,7 @@ function updateMessages($flag, $content_type, $emailaddresses, $mail_id_array, $
|
||||
}
|
||||
|
||||
/**
|
||||
* @author Mikko Husari <husku@husku.net>
|
||||
* Update white/blaclist function
|
||||
* @param string $flag 'W', 'B'
|
||||
* @param array $emailaddresses recipient email address(es)
|
||||
@ -318,6 +319,8 @@ function updateWblist($flag, $emailaddresses, $mail_id_array, $action) {
|
||||
// Check if logged in user is admin or logged in user is trying to delete his own messages
|
||||
if ( Auth::isMailAdmin() || in_array($recip_email, $emailaddresses) ) {
|
||||
switch ($action) {
|
||||
case translate('Whitelist'):
|
||||
case translate('Blacklist'):
|
||||
case translate('Whitelist by strict addressing'):
|
||||
case translate('Blacklist by strict addressing'):
|
||||
$rid = $db->mail2userid($recip_email);
|
||||
|
@ -90,9 +90,11 @@ if ( ! isset($mail_id_array) && $action != translate('Delete All') )
|
||||
|
||||
elseif ( isset( $action ) ) {
|
||||
switch ( $action ) {
|
||||
case translate('Whitelist'):
|
||||
updateWblist('W', $_SESSION['sessionMail'], $mail_id_array, $action);
|
||||
case translate('Release'):
|
||||
case translate('Release/Request release'):
|
||||
if ($w_action != "" ) {
|
||||
if ($w_action != "" && $action != translate('Whitelist') ) {
|
||||
updateWblist('W', $_SESSION['sessionMail'], $mail_id_array, $w_action);
|
||||
}
|
||||
$failed_array = releaseMessages($_SESSION['sessionMail'], $mail_id_array);
|
||||
@ -115,8 +117,10 @@ elseif ( isset( $action ) ) {
|
||||
}
|
||||
break;
|
||||
|
||||
case translate('Blacklist'):
|
||||
updateWblist('B', $_SESSION['sessionMail'], $mail_id_array, $action);
|
||||
case translate('Delete'):
|
||||
if ($b_action != "" ) {
|
||||
if ($b_action != "" && $action != translate('Blacklist') ) {
|
||||
updateWblist('B', $_SESSION['sessionMail'], $mail_id_array, $b_action);
|
||||
}
|
||||
$failed_array = updateMessages('D', $content_type, $_SESSION['sessionMail'], $mail_id_array);
|
||||
|
@ -274,7 +274,7 @@ function printActionButtons( $printDeleteAll = true, $wbselect = true ) {
|
||||
echo '</select>';
|
||||
}
|
||||
} else {
|
||||
echo ( Auth::isMailAdmin() || Auth::isDomainAdmin() ? translate('Release') : translate('Release/Request release') );
|
||||
echo '<input type="submit" class="button" name="action" value="'.translate('Blacklist').'" />';
|
||||
}
|
||||
echo '<input type="submit" class="button" name="action" value="'.translate('Delete').'" />';
|
||||
if ( $printDeleteAll )
|
||||
|
Loading…
Reference in New Issue
Block a user