Fix for ext-wernis, some rewrites, fixes for array-to-string convertion
[mailer.git] / inc / extensions / ext-wernis.php
index 9d03db33ff890eaf0eda4e85aba4e444def4eb51..23d8cb6e87b68a9253e88acec9932dfadff5f03c 100644 (file)
 if (!defined('__SECURITY')) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php';
        require($INC);
-}
+} // END - if
 
 // Version of this extension
-EXT_SET_VERSION('0.0.4');
+EXT_SET_VERSION('0.0.3');
 
 // Version history array (add more with , '0.1.0' and so on)
-EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4'));
+EXT_SET_VER_HISTORY(array('0.0', '0.0.1', '0.0.2', '0.0.3'));
 
-switch ($EXT_LOAD_MODE)
-{
+switch ($EXT_LOAD_MODE) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
                // SQL commands to run
                ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_wernis`");
@@ -104,8 +103,7 @@ PRIMARY KEY(id)
                break;
 
        case 'update': // Update an extension
-               switch ($EXT_VER)
-               {
+               switch ($EXT_VER) {
                        case '0.0.1': // SQL queries for v0.0.1
                                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_payout_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
                                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD wernis_withdraw_active ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
@@ -128,17 +126,10 @@ PRIMARY KEY(id)
                                break;
 
                        case '0.0.3': // SQL queries for v0.0.3
-                               ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` CHANGE `wernis_refid` `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
-
-                               // Update notes (these will be set as task text!)
-                               EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf BIGINT(5) geändert.");
-                               break;
-
-                       case '0.0.4': // SQL queries for v0.0.4
                                ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `wernis_refid` INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT '00000'");
 
                                // Update notes (these will be set as task text!)
-                               EXT_SET_UPDATE_NOTES("Fehlende Ref-Id hinzugetan.");
+                               EXT_SET_UPDATE_NOTES("Spaltentyp von VARCHAR(6) auf INT(5) geändert.");
                                break;
                }
                break;