]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-register.php
ext-refback is now longer essential for the referal system, please make sure that...
[mailer.git] / inc / extensions / ext-register.php
index 40adb576db89504ff07acdcc10c675b1ba26bbef..473c5195d0b677f99f49d6364a7b2b9adad69f1b 100644 (file)
@@ -41,15 +41,15 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.5.5');
+setThisExtensionVersion('0.5.6');
 
 // 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', '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'));
+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', '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'));
 
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
                // SQL commands to run
-               addGuestMenuSql('members', 'register', 'Anmeldung', 'Y', 'N', 2);
+               addGuestMenuSql('members', 'register', 'Anmeldung', 2);
                break;
 
        case 'remove': // Do stuff when removing extension
@@ -64,24 +64,24 @@ switch (getExtensionMode()) {
 
        case 'activate': // Do stuff when admin activates this extension
                // SQL commands to run
-               addExtensionSql('');
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='N', `visible`='Y' WHERE `what`='register' LIMIT 1");
                break;
 
        case 'deactivate': // Do stuff when admin deactivates this extension
                // SQL commands to run
-               addExtensionSql('');
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_guest_menu` SET `locked`='Y', `visible`='N' WHERE `what`='register' LIMIT 1");
                break;
 
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.1.0': // SQL queries for v0.1
                                addDropTableSql('must_register');
-                               addCreateTableSql('must_register', "(
+                               addCreateTableSql('must_register', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `field_name` VARCHAR(255) NOT NULL DEFAULT '',
 `field_required` ENUM('Y','N') NOT NULL DEFAULT 'Y',
-PRIMARY KEY (`id`)
-) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Data which fields the user must fill out'");
+PRIMARY KEY (`id`)",
+                                       'Data which fields the user must fill out');
 
                                // Add all entries as required (DO NOT DELETE THEM FROM DATABASE!)
                                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_must_register` (`field_name`, `field_required`) VALUES ('surname','Y')");
@@ -343,6 +343,16 @@ PRIMARY KEY (`id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Weiteren Men&uuml;punkt aus <strong>menu-{?DEFAULT_LANG?} heraus geholt.");
                                break;
+
+                       case '0.5.6': // SQL queries for v0.5.6
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_points_data` (`subject`, `column_name`, `locked_mode`, `payment_method`) VALUES ('register_welcome','points','LOCKED','DIRECT')");
+
+                               // This depends on ext-sql_patches
+                               addExtensionDependency('sql_patches');
+
+                               // Update notes
+                               setExtensionUpdateNotes("Anmeldewillkommensgutschrift wird nun &uuml;ber die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
+                               break;
                } // END - switch
                break;