]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-user.php
SQLs fixed
[mailer.git] / inc / extensions / ext-user.php
index 8cc037b7daaf6577640794c1877ec1a866f8e77f..124d3be6977abe8f84d22d26f13cc109cd899284 100644 (file)
@@ -52,7 +52,7 @@ setExtensionAlwaysActive('Y');
 switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running (modules.php?module=admin is called)
                addDropTableSql('user_cats');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_cats` (
+               addCreateTableSql('user_cats', "(
 `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `cat_id` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -62,7 +62,7 @@ INDEX (`cat_id`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User->category connection data'");
 
                addDropTableSql('user_data');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_data` (
+               addCreateTableSql('user_data', "(
 `userid` BIGINT(22) NOT NULL AUTO_INCREMENT,
 `surname` VARCHAR(255) NOT NULL DEFAULT '',
 `family` VARCHAR(255) NOT NULL DEFAULT '',
@@ -103,7 +103,7 @@ INDEX `status_mails` (`status`,`max_mails`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Main user data'");
 
                addDropTableSql('user_points');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_points` (
+               addCreateTableSql('user_points', "(
 `id` BIGINT(22) NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(22) NOT NULL DEFAULT 0,
 `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0,
@@ -114,7 +114,7 @@ INDEX (`userid`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'User points (no used points)'");
 
                addDropTableSql('user_links');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_links` (
+               addCreateTableSql('user_links', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -125,7 +125,7 @@ INDEX (`stats_id`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Unconfirmed mails per user'");
 
                addDropTableSql('user_stats');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats` (
+               addCreateTableSql('user_stats', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
@@ -147,7 +147,7 @@ INDEX (`pool_id`)
 ) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Mail statistics per user order'");
 
                addDropTableSql('user_stats_data');
-               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_stats_data` (
+               addCreateTableSql('user_stats_data', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown',
@@ -196,7 +196,7 @@ INDEX (`stats_type`)
        case 'update': // Update an extension
                switch (getCurrentExtensionVersion()) {
                        case '0.1.0': // SQL queries for v0.1
-                               addConfigAddSql('user_limit', "INT(7) UNSIGNED NOT NULL DEFAULT 20");
+                               addConfigAddSql('user_limit', 'INT(7) UNSIGNED NOT NULL DEFAULT 20');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Seitenweises Anzeigen der User-Liste ist nun möglich.");
@@ -260,7 +260,7 @@ INDEX (`stats_type`)
                                break;
 
                        case '0.2.1': // SQL queries for v0.2.1
-                               addConfigAddSql('user_alpha', "TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
+                               addConfigAddSql('user_alpha', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
                                addAdminMenuSql('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8);
 
                                // Update notes (these will be set as task text!)
@@ -335,7 +335,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");
+                               addConfigAddSql('user_min_confirmed', 'SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10');
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
 
                                // Update notes (these will be set as task text!)
@@ -345,10 +345,10 @@ INDEX (`stats_type`)
                        case '0.3.5': // SQL queries for v0.3.5
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT");
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
-                               addConfigAddSql('user_delete_purge', "BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getOneDay() * 30)."");
+                               addConfigAddSql('user_delete_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 30));
                                addAdminMenuSql('user', 'list_user_del', 'Löschungen auflisten', 'Listet die Löschungen von Usern auf.', 9);
                                addDropTableSql('user_del');
-                               addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_del` (
+                               addCreateTableSql('user_del', "(
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `email` VARCHAR(255) NOT NULL DEFAULT '',
@@ -417,7 +417,7 @@ PRIMARY KEY (`id`)
                                addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL");
 
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Standardwert 0000-00-00 00:00:00 ist nun einfach NULL.");
+                               setExtensionUpdateNotes("Ausgangswert ist nicht mehr 0000-00-00 00:00:00, sondern einfach NULL.");
                                break;
                } // END - switch
                break;