]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-debug.php
ADD UNIQUE ... what? INDEX now. And auto-unregistration of missing filter functions...
[mailer.git] / inc / extensions / ext-debug.php
index fa314cc331e50802c076310d79064596d865ead7..7bd1d757b8130ae4dd2793a8a38e45f5c40eaacc 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -56,7 +56,7 @@ switch (getExtensionMode()) {
        case 'register': // Do stuff when installation is running
                // Table for debug log entries
                addDropTableSql('debug_log');
-               addCreateTableSql('debug_log', "(
+               addCreateTableSql('debug_log', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
@@ -66,25 +66,25 @@ switch (getExtensionMode()) {
 `comment` TINYTEXT,
 `status` ENUM('NEW','PENDING','ACCEPTED','FIXED','INVALID','DUBLICATE','SPAM') NOT NULL DEFAULT 'NEW',
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-INDEX (`sender_id`),
-PRIMARY KEY (`id`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Debug log data'");
+PRIMARY KEY (`id`),
+INDEX (`sender_id`)",
+                       'Debug log data');
 
                // Table against debug log abuse
                addDropTableSql('debug_log_abuse');
-               addCreateTableSql('debug_log_abuse', "(
+               addCreateTableSql('debug_log_abuse', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00',
 `raw_data` LONGTEXT,
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-INDEX (`client_id`),
-PRIMARY KEY (`id`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Debug log abuse'");
+PRIMARY KEY (`id`),
+INDEX (`client_id`)",
+                       'Debug log abuse');
 
                // Table on relay/server for client exchanges
                addDropTableSql('debug_client');
-               addCreateTableSql('debug_client', "(
+               addCreateTableSql('debug_client', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
 `key` VARCHAR(255) NOT NULL DEFAULT 'SELF',
 `url` VARCHAR(255) NOT NULL DEFAULT '',
@@ -94,31 +94,31 @@ PRIMARY KEY (`id`)
 `type` ENUM ('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT',
 `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
 `lock_spam_reason` TINYTEXT,
+PRIMARY KEY (`id`),
 UNIQUE (`key`),
-UNIQUE (`url`),
-PRIMARY KEY (`id`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Debug clients'");
+UNIQUE (`url`)",
+                       'Debug clients');
 
                // Add this exchange as first client
                addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_debug_client` (`url`,`title`,`webmaster`,`status`) VALUES ('{?URL?}','{?MAIN_TITLE?}','{?WEBMASTER?}','ACTIVE')");
 
                // Table for debug log <-> client connection
                addDropTableSql('debug_client_log');
-               addCreateTableSql('debug_client_log', "(
+               addCreateTableSql('debug_client_log', "
 `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
-`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 1,
+`client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
 `log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0,
-INDEX `client_log` (`client_id`,`log_id`),
+PRIMARY KEY (`id`),
 UNIQUE (`log_id`),
-PRIMARY KEY (`id`)
-) TYPE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'Debug client <-> log connection'");
+INDEX `client_log` (`client_id`,`log_id`)",
+                       'Debug client <-> log connection');
 
                // Guest menus
-               addGuestMenuSql('debug',NULL,'Debug-System','Y','Y',2);
-               addGuestMenuSql('debug','debug_info','Informationen','Y','Y',1);
-               addGuestMenuSql('debug','debug_reg','Anmeldung','Y','Y',2);
-               addGuestMenuSql('debug','debug_unreg','Abmeldung','Y','Y',3);
-               addGuestMenuSql('debug','debug_pilory','Spam-Pranger','Y','Y',4);
+               addGuestMenuSql('debug', NULL, 'Debug-System', 2);
+               addGuestMenuSql('debug', 'debug_info', 'Informationen', 1);
+               addGuestMenuSql('debug', 'debug_reg', 'Anmeldung', 2);
+               addGuestMenuSql('debug', 'debug_unreg', 'Abmeldung', 3);
+               addGuestMenuSql('debug', 'debug_pilory', 'Spam-Pranger', 4);
 
                // Admin menu
                addAdminMenuSql('debug', NULL, 'Debug-System', 'Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>{?CACHE_PATH?}</strong> befindet.', 10);