-switch ($EXT_LOAD_MODE)
-{
-case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('stats','usage','Aufrufstatistik','Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)',9)");
- ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `usage_base` VARCHAR(255) NOT NULL DEFAULT 'usage'");
- break;
+switch (getExtensionMode()) {
+ case 'register': // Do stuff when installation is running
+ // SQL commands to run
+ addAdminMenuSql('stats', 'usage', 'Aufrufstatistik', 'Erkennt automatisch Ihre Aufrufstatisiken und bindet diese in das Admin-Interface ein. (Derzeit nur Webalizer!)', 9);
+ addConfigAddSql('usage_base', "VARCHAR(255) NOT NULL DEFAULT 'usage'");
+ break;