X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-debug.php;h=9a3296b7ef1aa6498d167e20d8d6eef59ee3cd52;hb=87229cb5d7b5396793e85fd0b4172d473195835c;hp=d535db08fab5349fba3229cb9353b513b05f5c7b;hpb=574b57b6325fca8215185a586b2f4ee0158c3353;p=mailer.git diff --git a/inc/extensions/ext-debug.php b/inc/extensions/ext-debug.php index d535db08fa..9a3296b7ef 100644 --- a/inc/extensions/ext-debug.php +++ b/inc/extensions/ext-debug.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2013 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -50,10 +50,10 @@ setExtensionVersionHistory(array('0.0.0')); setExtensionAlwaysActive('Y'); // This extension is in development (non-productive) -enableExtensionProductive(false); +enableExtensionProductive(FALSE); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running + case 'setup': // Do stuff when installation is running // Table for debug log entries addDropTableSql('debug_log'); addCreateTableSql('debug_log', " @@ -61,9 +61,9 @@ switch (getExtensionMode()) { `sender_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00', `file` VARCHAR(255) NOT NULL DEFAULT '', -`line` MEDIUMINT NOT NOT NULL DEFAULT 0, -`message` LONGTEXT, -`comment` TINYTEXT, +`line` MEDIUMINT NOT NULL DEFAULT 0, +`message` LONGTEXT NOT NULL, +`comment` TINYTEXT NOT NULL, `status` ENUM('NEW','PENDING','ACCEPTED','FIXED','INVALID','DUBLICATE','SPAM') NOT NULL DEFAULT 'NEW', `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), @@ -76,7 +76,7 @@ INDEX (`sender_id`)", `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, +`raw_data` LONGTEXT NOT NULL, `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`client_id`)", @@ -93,14 +93,14 @@ INDEX (`client_id`)", `status` ENUM('ACTIVE','NEW','PENDING','LOCKED','DELETED','SPAM') NOT NULL DEFAULT 'PENDING', `type` ENUM ('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT', `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -`lock_spam_reason` TINYTEXT, +`lock_spam_reason` TINYTEXT NOT NULL, PRIMARY KEY (`id`), -UNIQUE (`key`), -UNIQUE (`url`)", +UNIQUE INDEX (`key`), +UNIQUE INDEX (`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')"); + 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'); @@ -109,8 +109,8 @@ UNIQUE (`url`)", `client_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `log_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), -UNIQUE (`log_id`), -INDEX `client_log` (`client_id`,`log_id`)", +UNIQUE INDEX (`log_id`), +INDEX `client_log` (`client_id`, `log_id`)", 'Debug client <-> log connection'); // Guest menus @@ -179,7 +179,7 @@ INDEX `client_log` (`client_id`,`log_id`)", break; default: // Unknown extension mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; } // END - switch