]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-user.php
Some HTML fixes, ext-sql_patches downgraded (!):
[mailer.git] / inc / extensions / ext-user.php
index 994b40b92915c3566030f8df1f6f6553696a83ff..97568175d711fc002e3f61d9a28fb825a09a48ec 100644 (file)
@@ -41,10 +41,10 @@ if (!defined('__SECURITY')) {
 } // END - if
 
 // Version number
-setThisExtensionVersion('0.5.8');
+setThisExtensionVersion('0.5.9');
 
 // 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', '0.5.6', '0.5.7', '0.5.8'));
+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', '0.5.7', '0.5.8', '0.5.9'));
 
 // Keep this extension always active!
 setExtensionAlwaysActive('Y');
@@ -230,7 +230,7 @@ INDEX (`stats_type`)",
                                break;
 
                        case '0.1.2': // SQL queries for v0.1.2
-                               addExtensionAddTableColumnSql('online', 'mails_confirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'mails_confirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
@@ -242,7 +242,7 @@ INDEX (`stats_type`)",
                                break;
 
                        case '0.1.4': // SQL queries for v0.1.4
-                               addExtensionAddTableColumnSql('online', 'emails_received', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'emails_received', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?mt_word?} haben sollen!</big>");
@@ -355,7 +355,7 @@ INDEX (`stats_type`)",
                        case '0.3.4': // SQL queries for v0.3.4
                                addConfigAddSql('select_user_zero_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
                                addConfigAddSql('user_min_confirmed', 'SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10');
-                               addExtensionAddTableColumnSql('online', 'rand_confirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+                               addExtensionAddTableColumnSql('user_data', 'rand_confirmed', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Mitglieder werden per Zufall als Referral-Id ausgew&auml;hlt, die eine Mindestanzahl an best&auml;tigten Mails haben, wenn die Ref-Id 0 ist.");
@@ -386,8 +386,8 @@ INDEX (`userid`)",
                                break;
 
                        case '0.3.6': // SQL queries for v0.3.6
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`');
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE `userid_catid` (`userid`, `cat_id`)');
+                               addExtensionDropTableIndexSql('user_cats', 'userid`');
+                               addExtensionAddTableUniqueSql('user_cats', 'userid_catid', '(`userid`, `cat_id`)');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim L&ouml;schen des Users mit ausgesendet.");
@@ -607,7 +607,7 @@ INDEX (`subid`)",
                                addDropTableSql('subid_log');
                                addCreateTableSql('subid_log', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
+`refid` BIGINT(20) UNSIGNED NULL DEFAULT NULL,
 `subid` VARCHAR(255) NOT NULL DEFAULT '',
 `referral_url` TINYTEXT NOT NULL,
 `remote_address` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0',
@@ -618,8 +618,8 @@ INDEX (`subid`)",
                                        'Sub id logging');
 
                                // For saving used subid in user_data table
-                               addExtensionAddTableColumnSql('online', 'subid', 'VARCHAR(255) NULL DEFAULT NULL');
-                               addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD INDEX (`subid`)');
+                               addExtensionAddTableColumnSql('user_data', 'subid', 'VARCHAR(255) NULL DEFAULT NULL');
+                               addExtensionAddTableIndexSql('user_data', 'subid', '(`subid`)');
 
                                // Configuration entry for purging old subid logs (7 days default)
                                addConfigAddSql('user_subid_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
@@ -674,6 +674,20 @@ INDEX (`subid`)",
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Bereinigung von Sub-Ids und deren Einstellungen hinzugef&uuml;gt.");
                                break;
+
+                       case '0.5.9': // SQL queries for v0.5.9
+                               addExtensionChangeTableColumnSql('subid_log', 'refid', 'refid', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+                               addExtensionChangeTableColumnSql('user_stats', 'cat_id', 'cat_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+                               addExtensionChangeTableColumnSql('user_stats', 'payment_id', 'payment_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+                               addExtensionChangeTableColumnSql('user_stats', 'pool_id', 'pool_id', 'BIGINT(20) UNSIGNED NULL DEFAULT NULL');
+                               addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_subid_log` SET `refid`=NULL WHERE `refid`=0');
+                               addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0');
+                               addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0');
+                               addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Besser NULL anstelle 0.");
+                               break;
                } // END - switch
                break;