// Version of this extension
setThisExtensionVersion('0.0.3');
-// 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'));
+// 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'));
switch (getExtensionMode()) {
- case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ case 'register': // Do stuff when installation is running
// SQL commands to run
addDropTableSql('user_wernis');
addCreateTableSql('user_wernis', "(
) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Transfered Wernis per user'");
// Confiuration
- addConfigAddSql('wernis_min_payout', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'");
- addConfigAddSql('wernis_min_withdraw', "BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'");
- addConfigAddSql('wernis_api_id', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('wernis_min_payout', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 40000');
+ addConfigAddSql('wernis_min_withdraw', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 5000');
+ addConfigAddSql('wernis_api_id', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
addConfigAddSql('wernis_api_md5', "VARCHAR(32) NOT NULL DEFAULT ''");
addConfigAddSql('wernis_api_url', "VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'");
case '0.0.1': // SQL queries for v0.0.1
addConfigAddSql('wernis_payout_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
addConfigAddSql('wernis_withdraw_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
- addConfigAddSql('wernis_payout_factor', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- addConfigAddSql('wernis_withdraw_factor', "FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000");
- addConfigAddSql('wernis_payout_fee_percent', "FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addConfigAddSql('wernis_withdraw_fee_percent', "FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000");
- addConfigAddSql('wernis_payout_fee_fix', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- addConfigAddSql('wernis_withdraw_fee_fix', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addConfigAddSql('wernis_payout_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
+ addConfigAddSql('wernis_withdraw_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
+ addConfigAddSql('wernis_payout_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+ addConfigAddSql('wernis_withdraw_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+ addConfigAddSql('wernis_payout_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addConfigAddSql('wernis_withdraw_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("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;
case '0.0.3': // SQL queries for v0.0.3
- addConfigAddSql('wernis_refid', "INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00000");
+ addConfigAddSql('wernis_refid', 'INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00000');
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("WDS66-Username muss nun eintragen werden (API-Anpassung).");