]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_yoomedia_tm.php
Some language strings rewritten to use getMessage()
[mailer.git] / inc / modules / admin / what-list_yoomedia_tm.php
index dd4e2303af607e7cfa5c8fab397fe3853182cc19..c5b3a4d8f9f219682dc662bab29f27de39bb3a2f 100644 (file)
@@ -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("<br />", $code);
-       $code = $codeArray[0];
-       $codeArray = explode("<br>", $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))));