switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ // Add dependency to 'bonus'
+ addExtensionDependency('bonus');
+
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE','DELETED') NOT NULL DEFAULT 'TEMP'");
- if (isExtensionActive('bonus')) {
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
- }
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND','DELETED') NOT NULL DEFAULT 'NEW'");
break;
case 'remove': // Do stuff when removing extension
// SQL commands to run
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_pool` MODIFY data_type ENUM('TEMP','SEND','NEW','ADMIN','ACTIVE') NOT NULL DEFAULT 'TEMP'");
- if (isExtensionActive('bonus')) {
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
- }
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` MODIFY data_type ENUM('NEW','QUEUE','SEND') NOT NULL DEFAULT 'NEW'");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_autopurge','list_autopurge')");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP ap_notified");
break;
case 'update': // Update an extension
switch (getCurrentExtensionVersion()) {
case '0.1.0': // SQL queries for v0.1
+ // Add dependency to 'user'
+ addExtensionDependency('user');
+
+ // SQL queries
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_inactive` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `autopurge_unconfirmed` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `ap_inactive_since` BIGINT(20) UNSIGNED NOT NULL DEFAULT '2592000'");
switch (getExtensionMode()) {
case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
+ // Add dependency to 'user'
+ addExtensionDependency('user');
+
// SQL commands to run
addAdminMenuSql('email','send_bonus','Bonusmail senden','Versenden Sie hier Bonus-Mails an alle Mitglieder oder nur an alle aus einer Kategorie. Es spielt keine Rolle, wie viele Mails bereits versendet worden, Sie können hier immer senden.', 5);
addMemberMenuSql('main','bonus','Bonuspunkte','N','Y',7);