Marked some unfinished extensions as 'work-in-progress'
[mailer.git] / inc / extensions / ext-other.php
index cd8ed9f78cfa6123a53907c65657906e3fe2d7cc..fabc988ff7cfd6ecc5b5eb9430ab32b4e8cfa463 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 09/19/2004 *
- * ================                             Last change: 10/29/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 09/19/2004 *
+ * ===================                          Last change: 10/29/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-other.php                                    *
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -42,10 +43,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.2.2');
+setThisExtensionVersion('0.2.5');
 
 // Version history array (add more with , '0.1.0' and so on)
-setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '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', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2'));
+setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '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', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -53,12 +54,15 @@ setExtensionAlwaysActive('Y');
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                // SQL commands to run
-               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem Mailtausch.',13)");
+               addAdminMenuSql('setup','config_other','Sonstige Einstellungen','Sonstige Einstellungen an Ihrem {?mt_word?}.',13);
                break;
 
        case 'remove': // Do stuff when removing extension
                // SQL commands to run
                addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_other'");
+
+               // Unregister filter
+               unregisterFilter('page_footer', 'DISPLAY_DEBUG_SQL', true, getExtensionDryRun());
                break;
 
        case 'activate': // Do stuff when admin activates this extension
@@ -89,7 +93,7 @@ switch (getExtensionMode()) {
                                break;
 
                        case '0.0.4': // SQL queries for v0.0.4
-                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT '3'");
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD max_comma TINYINT(3) UNSIGNED NOT NULL DEFAULT 3");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Angezeigte Kommastellen k&ouml;nnen zwischen 0 und 5 eingestellt werden.");
@@ -139,7 +143,7 @@ switch (getExtensionMode()) {
 
                        case '0.1.2': // SQL queries for v0.1.2
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("W&ouml;rter <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
+                               setExtensionUpdateNotes("W&ouml;rter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
                                break;
 
                        case '0.1.3': // SQL queries for v0.1.3
@@ -203,6 +207,28 @@ switch (getExtensionMode()) {
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("(Fast) alle SQL-Abfragen lassen sich nun zu Debugging-Zwecken (!) einschalten. Nur der Administrator sieht diese unten am Ende der Seite.");
                                break;
+
+                       case '0.2.3': // SQL queries for v0.2.3
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `max_send` BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Fehlende Konfiguration hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.2.4': // SQL queries for v0.2.4
+                               // Register filter
+                               registerFilter('page_footer', 'DISPLAY_DEBUG_SQL', false, true, getExtensionDryRun());
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Filter zum Anzeigen (Debug) von ausgef&uuml;hrten SQL-Anweisungen hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.2.5': // SQL queries for v0.2.5
+                               addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `code_length` TINYINT(3) UNSIGNED NOT NULL DEFAULT 5");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Codel&auml;nge aus tables.sql rausgeholt.");
+                               break;
                }
                break;
 
@@ -216,7 +242,7 @@ switch (getExtensionMode()) {
                break;
 
        default: // Unknown extension mode
-               DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode()));
+               logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
                break;
 }