X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Fyoomedia_functions.php;h=09f057640498342a7889c7524d32aafd98fdabc4;hb=bb3d322203724ae9026368c8da7bda02da01940e;hp=61dbaf9cb81922bd368a7e7a22c14f72c845f9b9;hpb=21a24662ddc70624c27c607e3904aab23e893898;p=mailer.git diff --git a/inc/libs/yoomedia_functions.php b/inc/libs/yoomedia_functions.php index 61dbaf9cb8..09f0576404 100644 --- a/inc/libs/yoomedia_functions.php +++ b/inc/libs/yoomedia_functions.php @@ -10,10 +10,10 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Spezielle Funktion fuer Yoo!Media-Erweiterung * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } @@ -172,13 +172,13 @@ function YOOMEDIA_PARSE_RESPONSE ($response, $type) { return $result; } -// Prepares a bonus mail for delivery. Works only if extension "bonus" is active +// Prepares a bonus mail for delivery. Works only if extension 'bonus' is active function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { // Is this an admin? if (!IS_ADMIN()) { // Abort here return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { + } elseif (!EXT_IS_ACTIVE('bonus')) { // Abort here return false; } @@ -199,7 +199,7 @@ function YOOMEDIA_PREPARE_MAIL_DELIVERY ($data) { $data['all'] = TRANSLATE_COMMA(GET_TOTAL_RECEIVERS()); // Add categories - $data['categories'] = ADD_CATEGORY_OPTIONS("normal"); + $data['categories'] = ADD_CATEGORY_OPTIONS('normal'); // Load template LOAD_TEMPLATE("admin_send_yoomedia", false, $data); @@ -211,7 +211,7 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) { if (!IS_ADMIN()) { // Abort here return false; - } elseif (!EXT_IS_ACTIVE("bonus")) { + } elseif (!EXT_IS_ACTIVE('bonus')) { // Abort here return false; } @@ -220,8 +220,8 @@ function YOOMEDIA_SEND_BONUS_MAIL ($data, $mode) { $data['receiver'] = 0; // HTML or normal? (normal is default...) - $type = "t"; - if (($mode == "html") && (EXT_IS_ACTIVE("html"))) $type = "h"; + $type = 't'; + if (($mode == 'html') && (EXT_IS_ACTIVE('html_mail'))) $type = 'h'; // Auto-generate URL $data['url'] = sprintf("http://www.yoomedia.de/code/%s-mail.php?id=%s&sid=%s", @@ -262,15 +262,13 @@ function YOOMEDIA_UNLIST_MAIL ($data, $mode) { // "Translates" the index number into an assosiative value function YOOMEDIA_TRANSLATE_INDEX ($type, $index) { - global $yoomediaTranslationTable; - // Default is the index $return = $index; // Is the element there? - if (isset($yoomediaTranslationTable[$type][$index])) { + if (isset($GLOBALS['translation_tables']['yoomedia'][$type][$index])) { // Use this element - $return = $yoomediaTranslationTable[$type][$index]; + $return = $GLOBALS['translation_tables']['yoomedia'][$type][$index]; } else { // Not found! DEBUG_LOG(__FUNCTION__, __LINE__, " type={$type},index={$index} not found."); @@ -282,15 +280,13 @@ function YOOMEDIA_TRANSLATE_INDEX ($type, $index) { // "Translate" error code function YOOMEDIA_TRANSLATE_ERROR ($errorCode) { - global $yoomediaTranslationTable; - // Default is "failed" $return = "failed"; // Is the entry there? - if (isset($yoomediaTranslationTable['error_codes'][$errorCode])) { + if (isset($GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode])) { // Entry found! - $return = $yoomediaTranslationTable['error_codes'][$errorCode]; + $return = $GLOBALS['translation_tables']['yoomedia']['error_codes'][$errorCode]; } else { // Log missing entries DEBUG_LOG(__FUNCTION__, __LINE__, " errorCode={$errorCode}"); @@ -349,11 +345,11 @@ function YOOMEDIA_RELOAD_LOCK ($data, $mode) { function YOOMEDIA_CONVERT_MODE ($mode) { // Convert mode for normal/html switch ($mode) { - case "normal": + case 'normal': $mode = "textmail"; break; - case "html": + case 'html': $mode = "htmlmail"; break; } // END - switch