X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_yoomedia_tm.php;h=c5b3a4d8f9f219682dc662bab29f27de39bb3a2f;hb=9e604ce404fe7d2d8dafc259a5fb8cd826aec5e6;hp=dd4e2303af607e7cfa5c8fab397fe3853182cc19;hpb=1e2a4228e071a67a2d79e970a843e3e30476cfb8;p=mailer.git diff --git a/inc/modules/admin/what-list_yoomedia_tm.php b/inc/modules/admin/what-list_yoomedia_tm.php index dd4e2303af..c5b3a4d8f9 100644 --- a/inc/modules/admin/what-list_yoomedia_tm.php +++ b/inc/modules/admin/what-list_yoomedia_tm.php @@ -55,13 +55,13 @@ if (isFormSent()) { // Prepare mail for delivery YOOMEDIA_PREPARE_MAIL_DELIVERY(REQUEST_POST_ARRAY()); return; -} elseif (REQUEST_ISSET_POST(('sent'))) { +} elseif (REQUEST_ISSET_POST('sent')) { // Sent mail YOOMEDIA_SEND_BONUS_MAIL(REQUEST_POST_ARRAY(), 'normal'); } elseif (REQUEST_ISSET_POST('remove')) { // Add mail to exclude list YOOMEDIA_EXCLUDE_MAIL(REQUEST_POST_ARRAY(), 'normal'); -} elseif (REQUEST_ISSET_POST(('unlist'))) { +} elseif (REQUEST_ISSET_POST('unlist')) { // Remove mail from exclude list YOOMEDIA_UNLIST_MAIL(REQUEST_POST_ARRAY(), 'normal'); } @@ -85,19 +85,7 @@ if ((!is_array($result)) || (count($result) == 0) || (!isset($result[0]['id']))) return false; } elseif (count($result[0]) < 7) { // Error received so prepare error code - $codeArray = explode(" ", $result[0]['id']); - $code = $codeArray[0]; - $codeArray = explode("
", $code); - $code = $codeArray[0]; - $codeArray = explode("
", $code); - $code = $codeArray[0]; - - // Remove all new-line characters - $codeArray = explode("\n", $code); - $code = $codeArray[0]; - - // Remove carrige-return - $code = str_replace("\n", '', $code); + $code = YOOMEDIA_GET_ERRORCODE_FROM_RESULT($result); // Output message LOAD_TEMPLATE('admin_yoomedia_error', false, sprintf("{--ADMIN_YOOMEDIA_ERROR_%s--}", strtoupper(yoomediaTranslateError($code))));