X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-wernis.php;h=cbd6d61f31ec199442e868adab7048ff4b72dd12;hp=4a901fde259ebe6c753dc57b7ccaaa779a162559;hb=b8e38719844932afed4b1ac23755a4c05b72eb99;hpb=5261b522112c11417fc87bb0b14ca078bfa398e3 diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 4a901fde25..cbd6d61f31 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -64,11 +64,11 @@ PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci"); // Confiuration - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"); + 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/'"); // User data addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD wernis_userid VARCHAR(6) NOT NULL DEFAULT ''"); @@ -108,28 +108,28 @@ PRIMARY KEY (`id`) case 'update': // Update an extension switch (getCurrentExtensionVersion()) { case '0.0.1': // SQL queries for v0.0.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_active` ENUM ('Y','N') NOT NULL DEFAULT 'Y'"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_factor` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_fee_percent` FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_payout_fee_fix` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_withdraw_fee_fix` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + 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"); // 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.2': // SQL queries for v0.0.2 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `wernis_pass_md5` VARCHAR(32) NOT NULL DEFAULT ''"); + addConfigAddSql('wernis_pass_md5', "VARCHAR(32) NOT NULL DEFAULT ''"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Auszahlunsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {?mt_word?} als MD5-Hash gespeichert werden."); break; case '0.0.3': // SQL queries for v0.0.3 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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).");