- Major change in menu system. You need to rewrite/update your member and guest
[mailer.git] / inc / extensions / ext-wernis.php
index bc2c925691433f8bf43c4cdf34dca7d4c4fdd46a..24634ea2c2798c7435a825c9895d7d0c507f19b1 100644 (file)
@@ -39,13 +39,13 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 }
 
 // Version of this extension
-$EXT_VERSION = "0.0";
+$EXT_VERSION = "0.0.1";
 
 // Auto-set extension version
 if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION;
 
 // Version history array (add more with , "0.1" and so on)
-$EXT_VER_HISTORY = array("0.0");
+$EXT_VER_HISTORY = array("0.0", "0.0.1");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -66,9 +66,9 @@ PRIMARY KEY(id)
 ) TYPE=MyISAM";
 
        // Confiuration
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) NOT NULL DEFAULT '40000'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) NOT NULL DEFAULT '5000'";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) NOT NULL DEFAULT '0'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'";
+       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''";
@@ -110,8 +110,17 @@ case "update": // Update an extension
        switch ($EXT_VER)
        {
        case "0.0.1": // SQL queries for v0.0.1
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_active ENUM ('Y', 'N') NOT NULL DEFAULT 'Y'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_active ENUM ('Y', 'N') NOT NULL DEFAULT 'Y'";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0";
+
                // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "";
+               $UPDATE_NOTES = "Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {!POINTS!}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.";
                break;
        }
        break;