This commit is contained in:
Mario Fetka 2016-02-04 22:22:01 +01:00
parent 8395d0ed52
commit 1c58d8079c

View File

@ -65,9 +65,13 @@ function releaseMessages($emailaddresses, $mail_id_array) {
foreach ($mail_id_array as $mail_id_recip) { foreach ($mail_id_array as $mail_id_recip) {
// Get mail_id and recipient email address // Get mail_id and recipient email address
$temp = preg_split('/_/', $mail_id_recip); // $temp = preg_split('/_/', $mail_id_recip);
$mail_id = str_replace("_" . $temp[(sizeof($temp) - 1)], "", $mail_id_recip); // $mail_id = str_replace("_" . $temp[(sizeof($temp) - 1)], "", $mail_id_recip);
$recip_email = $temp[(sizeof($temp) - 1)]; // $recip_email = $temp[(sizeof($temp) - 1)];
$help_recip_email = array_reverse(explode('_', $mail_id_recip));
$recip_email = $help_recip_email[0];
$help_mail_id = explode('_' . $recip_email, $mail_id_recip);
$mail_id = $help_mail_id[0];
// Check if logged in user is admin or logged in user is trying to release his own messages // Check if logged in user is admin or logged in user is trying to release his own messages
if ( Auth::isMailAdmin() || Auth::isDomainAdmin() || in_array($recip_email, $emailaddresses) ) if ( Auth::isMailAdmin() || Auth::isDomainAdmin() || in_array($recip_email, $emailaddresses) )