-) TYPE={!_TABLE_TYPE!} COMMENT='Debug client <-> log connection'");
-
- // Guest menus
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug',NULL,'Debug-System','Y','Y',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_info','Informationen','Y','Y',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_reg','Anmeldung','Y','Y',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_unreg','Abmeldung','Y','Y',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_guest_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('debug','debug_pilory','Spam-Pranger','Y','Y',4)");
-
- // Admin menu
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>inc/cache/</strong> befindet.',10)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom MXChange-Team geprüft werden können.',2)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {!MT_WORD!} ist dies) oder Relay am Server von MXChange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {!MT_WORD!}-Titel.',3)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {!MT_WORD!} wieder vom MXChange-Server ab, damit das Team von MXChange.org weiss, welche Keys nicht mehr genutzt werden.',4)");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von MXChange.org hilft Ihnen gerne weiter.',5)");
-
- // Config entries
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{!SERVER_URL!}'");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client_log`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_client`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log`");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_debug_log_abuse`");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_guest_menu` WHERE `action`='debug'");
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='debug'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `visible`='Y',`locked`='N' WHERE `action`='debug' LIMIT 5");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_guest_menu` SET `locked`='Y' WHERE `action`='debug' LIMIT 5");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.0.1': // SQL queries for v0.0.1
- ADD_EXT_SQL("");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("");
+) TYPE={?_TABLE_TYPE?} COMMENT='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);
+
+ // Admin menu
+ addAdminMenuSql('debug',NULL,'Debug-System','Verwalten Sie hier komfortabel das debug.log, welches sich im Verzeichnis <strong>{?CACHE_PATH?}/</strong> befindet.',10);
+ addAdminMenuSql('debug','import_debug','debug.log importieren','Importieren Sie hier manuell die debug.log, damit neue Einträge mit bestehenden abgeglichen werden können und dann evtl. hinzugefügt werden. Die <em>debug.log</em> wird nach dem Import automatisch vom Server entfernt. Dieser Vorgang wird für Sie nachts automatisch erledigt!',1);
+ addAdminMenuSql('debug','list_debug','Einträge anzeigen','Listet alle bereits importierten Einträge auf. Von hier aus versenden Sie noch nicht gemeldete Fehler an das Relay-Netzwerk, damt diese vom Entwicklerteam geprüft werden können.',2);
+ addAdminMenuSql('debug','reg_debug','Am Server anmelden','Sie müssen zuerst Ihren Debug-Client (Ihr {?mt_word?} ist dies) oder Relay am Server von mxchange.org anmelden. Dies geschieht für Sie nicht automatisch, da Sie Ihre Daten zuvor überprüfen müssen, wie z.B. URL, eMail-Adresse und {?mt_word?}-Titel.',3);
+ addAdminMenuSql('debug','unreg_debug','Vom Server abmelden','Melden Sie bitte Ihren {?mt_word?} wieder vom Projekt-Server ab, damit mein Entwicklerteam weiss, welche Keys nicht mehr genutzt werden.',4);
+ addAdminMenuSql('debug','config_debug','Einstellungen','Ändern Sie hier alle Einstellungen, wie auch den Debug-Modus - ob Client, Hub oder selber Server sein. Lesen Sie dazu die Anleitung unter DOCs/de/debug/README.txt durch! Oder kommen Sie in's Forum. Das Team von mxchange.org hilft Ihnen gerne weiter.',5);
+
+ // Config entries
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_key` VARCHAR(255) NOT NULL DEFAULT ''");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_mode` ENUM('CLIENT','RELAY','SERVER') NOT NULL DEFAULT 'CLIENT'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_log` ENUM('ACCEPT','FIRST','REG') NOT NULL DEFAULT 'FIRST'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_new_client` ENUM('ACTIVE','NEW','REG') NOT NULL DEFAULT 'NEW'");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_reject_log` BIGINT(20) UNSIGNED NOT NULL DEFAULT " . (getConfig('ONE_DAY') * 30));
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `debug_master_url` VARCHAR(255) NOT NULL DEFAULT '{?SERVER_URL?}'");