Heacy rewrite/cleanup:
[mailer.git] / inc / extensions / ext-html_mail.php
index 21d1c0151e15ff567f25b27f3ceda224d4ed93a8..53eb0ab7cae542c6fbd7b042b20893e864e5f20b 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.1.6');
+setThisExtensionVersion('0.1.7');
 
 // Version history array (add more with , '0.0.1' and so on)
-setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.51', '0.0.52', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6'));
+setExtensionVersionHistory(array('0.0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.51', '0.0.52', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7'));
 
 switch (getExtensionMode()) {
        case 'setup': // Do stuff when installation is running
@@ -58,6 +58,9 @@ switch (getExtensionMode()) {
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='html_mail' LIMIT 1");
+
+               // Remove filter(s)
+               unregisterFilter(__FILE__, __LINE__, 'pre_mail_order', 'MAIL_ORDER_GENERIC_CHECK_URL', TRUE, isExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -120,8 +123,18 @@ switch (getExtensionMode()) {
                        case '0.1.6':
                                // Dependency is needed for ext-registration!! (want to alter a non existent Table)
                                addExtensionDependency('bonus');
+
+                               // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Abh&auml;nigkeit von der Erweiterung <strong>bonus</strong> hinzugef&uuml;gt.");
                                break;
+
+                       case '0.1.7':
+                               // Register filter
+                               registerFilter(__FILE__, __LINE__, 'pre_mail_order', 'CHECK_HTML_MAIL_ORDER', FALSE, TRUE, isExtensionDryRun());
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Filter f&uuml;r ext-order hinzugef&uuml;gt.");
+                               break;
                } // END - switch
                break;