X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-bonus.php;h=375853e1b2c193582e421d1c4fee0d2aabd7ba9d;hp=28dd83f7df9c820552aa59e1d93349fb96a7e438;hb=0f3a135204757cc8750262871c8e62c42300acb4;hpb=387a99be2a05128c307013cb7ed27628a46c27f4 diff --git a/inc/extensions/ext-bonus.php b/inc/extensions/ext-bonus.php index 28dd83f7df..375853e1b2 100644 --- a/inc/extensions/ext-bonus.php +++ b/inc/extensions/ext-bonus.php @@ -41,10 +41,10 @@ if (!defined('__SECURITY')) { } // END - if // Version of this extension -setThisExtensionVersion('0.9.5'); +setThisExtensionVersion('0.9.7'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.6', '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', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5')); +setExtensionVersionHistory(array('0.0.0', '0.1.6', '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', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1', '0.6.2', '0.6.3', '0.6.4', '0.6.5', '0.6.6', '0.6.7', '0.6.8', '0.6.9', '0.7.0', '0.7.1', '0.7.2', '0.7.3', '0.7.4', '0.7.5', '0.7.6', '0.7.7', '0.7.8', '0.7.9', '0.8.0', '0.8.1', '0.8.2', '0.8.3', '0.8.4', '0.8.5', '0.8.6', '0.8.7', '0.8.8', '0.8.9', '0.9.0', '0.9.1', '0.9.2', '0.9.3', '0.9.4', '0.9.5', '0.9.6', '0.9.7')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running @@ -73,7 +73,6 @@ PRIMARY KEY (`id`), INDEX (`cat_id`)", 'Bonus mails'); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `link_type` `link_type` ENUM('NORMAL','BONUS') NOT NULL DEFAULT 'NORMAL'"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD `bonus_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` ADD INDEX (`bonus_id`)"); addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_bonus` ADD `html_msg` ENUM('Y','N') NOT NULL DEFAULT 'N'"); @@ -92,6 +91,7 @@ INDEX (`cat_id`)", // Unregister filter unregisterFilter(__FUNCTION__, __LINE__, 'member_login_check', 'ADD_LOGIN_BONUS', true, isExtensionDryRun()); unregisterFilter(__FUNCTION__, __LINE__, 'generate_admin_mail_links', 'GENERATE_BONUS_MAIL_LINKS', true, isExtensionDryRun()); + unregisterFilter(__FUNCTION__, __LINE__, 'add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension @@ -608,6 +608,30 @@ ORDER BY // Update notes setExtensionUpdateNotes("Filter zum Generieren von Admin-Links für Bonus-Mails hinzugefügt."); break; + + case '0.9.6': // SQL queries for v0.9.6 + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`,`column_name`,`locked_mode`,`payment_method`) VALUES ('monthly_bonus','points','LOCKED','DIRECT')"); + + // This depends on ext-sql_patches + addExtensionDependency('sql_patches'); + + // Update notes + setExtensionUpdateNotes("Monatlicher Bonus wird nun über die Tabelle {OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data verwaltet."); + break; + + case '0.9.7': // SQL queries for v0.9.7 + addConfigChangeSql('bonus_order_yn', 'include_bonus_order', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigChangeSql('bonus_ref_yn' , 'include_bonus_ref' , "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigChangeSql('bonus_stats_yn', 'include_bonus_stats', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigChangeSql('bonus_login_yn', 'include_bonus_login', "ENUM('Y','N') NOT NULL DEFAULT 'N'"); + addConfigChangeSql('bonus_click_yn', 'include_bonus_click', "ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Register filter + registerFilter('add_bonus_points_user_columns', 'ADD_BONUS_POINTS_USER_COLUMNS', false, true, isExtensionDryRun()); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Konfigurationseinträge umbenannt."); + break; } // END - switch break;