X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-payout.php;h=345965b2be17290fcd20693cfe809e0265215924;hb=f4d7dc336fde4cebc47701026a94d193f77854a1;hp=10f30779093073cb3d7b20ac92458ed1fb94de9a;hpb=6f8a68c6c5ed9eeae1bf790f5d758c800b5d5d5d;p=mailer.git diff --git a/inc/extensions/ext-payout.php b/inc/extensions/ext-payout.php index 10f3077909..345965b2be 100644 --- a/inc/extensions/ext-payout.php +++ b/inc/extensions/ext-payout.php @@ -43,17 +43,17 @@ if (!defined('__SECURITY')) { // Version of this extension setThisExtensionVersion('0.3.8'); -// Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('0.0', '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', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8')); +// Version history array (add more with , '0.0.1' and so on) +setExtensionVersionHistory(array('0.0.0', '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', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8')); 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_payouts'); - addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_payouts` ( + addCreateTableSql('user_payouts', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`payout_total` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +`payout_total` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT 0.000, `target_account` VARCHAR(255) NOT NULL DEFAULT '', `target_bank` VARCHAR(255) NOT NULL DEFAULT '', `payout_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, @@ -64,10 +64,10 @@ INDEX (`payout_id`), PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Done user payouts (and status)'"); addDropTableSql('payout_types'); - addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_payout_types` ( + addCreateTableSql('payout_types', "( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `type` VARCHAR(255) NOT NULL DEFAULT '', -`rate` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT '0.000', +`rate` FLOAT(22,3) UNSIGNED NOT NULL DEFAULT 0.000, `min_points` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Payout types'"); @@ -95,8 +95,7 @@ PRIMARY KEY (`id`) break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) - { + switch (getCurrentExtensionVersion()) { case '0.1.2': // SQL queries for v0.1.2 addAdminMenuSql('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.',8); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1"); @@ -234,7 +233,7 @@ PRIMARY KEY (`id`) // Update notes (these will be set as task text!) setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); break; - } + } // END - switch break; case 'modify': // When the extension got modified