* $Author:: $ *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
- * Copyright (c) 2009, 2010 by Mailer Developer Team *
+ * Copyright (c) 2009 - 2011 by Mailer Developer Team *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
case 'remove': // Do stuff when removing extension
// SQL commands to run
+ addDropTableSql('url_blacklist');
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1");
addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `action`='order'");
break;
case 'update': // Update an extension
switch (getCurrentExtensionVersion()) {
case '0.1.0': // SQL queries for v0.1
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `order_max_full` ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
+ addConfigAddSql('order_max_full', "ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7);
// Update notes (these will be set as task text!)
break;
case '0.2.3': // SQL queries for v0.2.3
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
+ addConfigAddSql('order_min', "BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
// Update notes (these will be set as task text!)
- setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger");
+ setExtensionUpdateNotes("Minimum an Empfänger pro Mailbuchung einstellbar. Standard: 10 Empfänger");
break;
case '0.2.4': // SQL queries for v0.2.4
break;
case '0.3.1': // SQL queries for v0.3.1
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_select VARCHAR(255) NOT NULL DEFAULT 'userid'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD order_mode ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
+ addConfigAddSql('order_select', "VARCHAR(255) NOT NULL DEFAULT 'userid'");
+ addConfigAddSql('order_mode', "ENUM('ASC','DESC') NOT NULL DEFAULT 'DESC'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Beworbene URL wird nun getestet.");
break;
case '0.4.9': // SQL queries for v0.4.9
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD repay_deleted_mails ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
+ addConfigAddSql('repay_deleted_mails', "ENUM('REPAY','JACKPOT','SHRED') NOT NULL DEFAULT 'REPAY'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Bei Löschung von Mailbuchungen kann nun scripteweit entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen.");
break;
case '0.5.0': // SQL queries for v0.5.0
- addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`');
+ addDropTableSql('url_blacklist');
addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` (
`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
`url` VARCHAR(255) NOT NULL DEFAULT '',
case '0.5.2': // SQL queries for v0.5.2
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_text`");
addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` DROP `test_subj`");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_text` ENUM('Y','N') NOT NULL DEFAULT 'N'");
- addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `allow_url_in_subject` ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigAddSql('allow_url_in_text', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
+ addConfigAddSql('allow_url_in_subject', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
// Update notes (these will be set as task text!)
setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert.");
case 'modify': // When the extension got modified
break;
- case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305.
+ case 'test': // For testing purposes
break;
case 'init': // Do stuff when extension is initialized