X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-html_mail.php;h=88481d29682d95f2182454ecae2861c873f8a78b;hp=23365d9c68c3b9f2a200d03cf4964e5befb7d469;hb=e5527fd38a6585c8466dc28d013f12d21eb7c07a;hpb=1b4494c45790f1ba6808bb6a037d777147bd8f23 diff --git a/inc/extensions/ext-html_mail.php b/inc/extensions/ext-html_mail.php index 23365d9c68..88481d2968 100644 --- a/inc/extensions/ext-html_mail.php +++ b/inc/extensions/ext-html_mail.php @@ -1,19 +1,23 @@ Patch 340 überflüssige HTML-Tags entfernt."; + case 'update': // Update an extension break; - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + case 'modify': // When the extension got modified break; - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sicherheitsupdate: SQL-Anweisungen geschützt."; + case 'test': // For testing purposes break; - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Abspeichern von Einstellungen repariert."; + case 'init': // Do stuff when extension is initialized + // Valid HTML tags (only simple and no attributes!) + // @TODO Move these arrays into config + $GLOBALS['html_tags'] = array( + 'b', + 'i', + 'u', + 'ol', + 'ul', + 'li', + 'strong', + 'center', + 'left', + 'right', + 'br', + ); + + // URL ends which are used to indentify the end of an URL or email link + // Don't use these chars in links... ;-) + // + $GLOBALS['url_ends'] = array( + ' ', + PHP_EOL, + chr(13), + ')', + ); + + // Valid email chars (without @, or do you want to have another @ inside your email email?) + $GLOBALS['valid_email_chars'] = array( + 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s', + 't','u','v','w','x','y','z','a','B','C','D','E','F','G','H','I','J','K','L', + 'M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','-','.','_',0,1, + 2,3,4,5,6,7,8,9 + ); break; - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlerhinweis bei deaktivierter Erweiterung verbessert."; + default: // Unknown extension mode + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; - } - break; - -default: // Do stuff when extension is loaded - - // Define all arrary variables as global! - global $HTML_TAGS, $URL_ENDS, $VALID_EMAI_CHARS; - - // Valid HTML tags (only simple and no attributes!) - $HTML_TAGS = array( - "b", - "i", - "u", - "ol", - "ul", - "li", - "strong", - "center", - "left", - "right", - "br", - ); - - // URL ends which are used to indentify the end of an URL or email link - // Don't use these chars in links... ;-) - // - $URL_ENDS = array( - " ", - "\n", - "\r", - ")", - ); - - // Valid email chars (without @, or do you want to have another @ inside your email addy?) - $VALID_EMAIL_CHARS = array( - 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', - 't', 'u', 'v', 'w', 'x', 'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', - 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '-', '.', '_', '0', '1', - '2', '3', '4', '5', '6', '7', '8', '9' - ); - break; -} -// Language file prefix -$EXT_LANG_PREFIX = "html_mail"; - -// Extension is always active? -$EXT_ALWAYS_ACTIVE = 'N'; - -// +} // END - switch + +// [EOF] ?>