X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-order.php;h=f6ad5bd84e38120fab9b04a40ba649210b0d8592;hb=fed7fa31618320f28ae73af4f19d008012d75849;hp=3c24781bb3e45252598710c58401e6de49f86f1c;hpb=596c8ab32594401ca84abfbfe35513ddfff31bec;p=mailer.git diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 3c24781bb3..f6ad5bd84e 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -41,20 +41,19 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.6'); +setThisExtensionVersion('0.5.7'); // Version history array (add more with , '0.0.1' and so on) -setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6')); +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7')); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running + case 'setup': // Do stuff when installation is running // SQL commands to run addMemberMenuSql('order', 'order', 'Mailbuchung', 1); break; 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'"); @@ -90,7 +89,7 @@ switch (getExtensionMode()) { break; case '0.1.1': // SQL queries for v0.1.1 - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `mail_orders` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"); + addExtensionAddTableColumnSql('user_data', 'mail_orders', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Maximale Mailbuchung vervollständigt (Admin-Bereich und im Buchungsformular selber)."); @@ -305,18 +304,8 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us break; case '0.5.0': // SQL queries for v0.5.0 - addDropTableSql('url_blacklist'); - addCreateTableSql('url_blacklist', " -`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, -`url` VARCHAR(255) NOT NULL DEFAULT '', -`pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -`timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, -PRIMARY KEY (`id`), -INDEX (`pool_id`)", - 'URL blacklist'); - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Tabelle für URL-Sperrliste angelegt."); + setExtensionUpdateNotes("Nicht mehr gültiges Update."); break; case '0.5.1': // SQL queries for v0.5.1 @@ -335,8 +324,8 @@ INDEX (`pool_id`)", break; case '0.5.3': // SQL queries for v0.5.3 - addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` ADD `order_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); - addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` ADD `locked_order_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addExtensionAddTableColumnSql('user_points', 'order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); + addExtensionAddTableColumnSql('user_points', 'locked_order_points', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000'); // This update depends on ext-user addExtensionDependency('user'); @@ -375,6 +364,13 @@ INDEX (`pool_id`)", // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter für Spaltenname des gesperrten Werbeguthabens hinzugefügt."); break; + + case '0.5.7': // SQL queries for v0.5.7 + addDropTableSql('url_blacklist'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Tabelle für URL-Sperrliste gelöscht (nach ext-blacklist verschoben)."); + break; } // END - switch break; @@ -391,7 +387,7 @@ INDEX (`pool_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