-PRIMARY KEY(id)
-) TYPE=MyISAM");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.','15')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.','16')");
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','payout','Auszahlungen','N','N','11')");
- break;
-
-case "remove": // Do stuff when removing extension
- // SQL commands to run
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_payouts`");
- ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_payout_types`");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='payouts'");
- ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='payout' LIMIT 1");
- break;
-
-case "activate": // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
- break;
-
-case "deactivate": // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
- break;
-
-case "update": // Update an extension
- switch ($EXT_VER)
- {
- case "0.1.2": // SQL queries for v0.1.2
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('payouts', NULL, 'Auszahlungsmanagement','Management der Auszahlungsarten.','8')");
- ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `action`='payouts', `title`='Einstellungen' WHERE `action`='setup' AND `what`='config_payouts' LIMIT 1");
- break;
-
- case "0.1.3": // SQL queries for v0.1.3
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
- break;
-
- case "0.1.4": // SQL queries for v0.1.4
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
- break;
-
- case "0.1.5": // SQL queries for v0.1.5
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD target_url LONGBLOB NOT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD banner_url LONGBLOB NOT NULL");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
- break;
-
- case "0.1.6": // SQL queries for v0.1.6
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
- break;
-
- case "0.1.8": // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
- break;
-
- case "0.1.9": // SQL queries for v0.1.9
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
- break;
-
- case "0.2.0": // SQL queries for v0.2.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("5 Nachkommastellen implementiert.");
- break;
+PRIMARY KEY (id)
+) TYPE={?_TABLE_TYPE?}");
+ addAdminMenuSql('setup','config_payouts','Auszahlungen','Auszahlungsarten einstellen, neu anlegen oder löschen.',15);
+ addAdminMenuSql('payouts','list_payouts','Anfragen auflisten','Listet alle Auszahlungsanfragen Ihrer Mitglieder auf.',16);
+ addMemberMenuSql('main','payout','Auszahlungen','N','N',11);
+ break;
+
+ case 'remove': // Do stuff when removing extension
+ // SQL commands to run
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_payouts`');
+ addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_payout_types`');
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='payouts'");
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='payout'");
+ break;
+
+ case 'activate': // Do stuff when admin activates this extension
+ // SQL commands to run
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='payout' LIMIT 1");
+ break;
+
+ case 'deactivate': // Do stuff when admin deactivates this extension
+ // SQL commands to run
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='payout' LIMIT 1");
+ break;
+
+ case 'update': // Update an extension
+ 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");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD from_account VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD from_pass VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_url VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_ret_ok VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD engine_ret_failed VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD pass_enc ENUM('md5','base64','none') NOT NULL DEFAULT 'md5'");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD password VARCHAR(255) NOT NULL DEFAULT ''");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD target_url LONGTEXT NOT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD banner_url LONGTEXT NOT NULL");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` ADD link_text VARCHAR(30) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` ADD allow_url ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ break;
+
+ case '0.1.6': // SQL queries for v0.1.6
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` CHANGE pass_enc pass_enc ENUM('md5','base64','xxx') NOT NULL DEFAULT 'xxx'");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Auflistung der Auszahlungen ausgelagert in Template <em>member_payout.tpl</em>.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("5 Nachkommastellen implementiert.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_payouts` CHANGE payout_total payout_total FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_payout_types` CHANGE rate rate FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt.");
+
+ case '0.2.2': // SQL queries for v0.2.2
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Buttons aus Aufgabenauflisten ausgelagert");
+ break;