X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-order.php;h=dbc2f8d5565000f068c9e72753b712ce2dae2c0e;hp=8c5b888796b35b78334b4ff3f00d5fba14af19ac;hb=5d89789720c77e954b2eba28c00ec710dd28900d;hpb=adb34cea9c14bcac14030f8eb1e6ae2c3231c962 diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 8c5b888796..dbc2f8d556 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -14,10 +14,9 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * + * Copyright (c) 2009, 2010 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -42,15 +41,15 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.1'); +setThisExtensionVersion('0.5.2'); // Version history array (add more with , '0.1.0' and so on) -setExtensionVersionHistory(array('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')); +setExtensionVersionHistory(array('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')); switch (getExtensionMode()) { case 'register': // Do stuff when installation is running (modules.php?module=admin is called) // SQL commands to run - addExtensionSql(''); + addMemberMenuSql('order','order','Mailbuchung','N','Y',1); break; case 'remove': // Do stuff when removing extension @@ -74,7 +73,7 @@ switch (getExtensionMode()) { 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'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD `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!) @@ -295,11 +294,11 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD 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 global entschieden werden (Einstellungen also), ob die verbliebenen {?POINTS?} wieder gutgeschrieben werden sollen oder in den Jackpot landen."); + 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`"); + addExtensionSql('DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_url_blacklist`'); addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_url_blacklist` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `url` VARCHAR(255) NOT NULL DEFAULT '', @@ -307,19 +306,22 @@ nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der Us `timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`pool_id`) -) TYPE=MYISAM COMMENT='URL blacklist'"); +) ENGINE = {?_TABLE_TYPE?} CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT = 'URL blacklist'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Tabelle für URL-Sperrliste angelegt."); break; - case '0.5.1': // SQL queries for v0.5.1 - addMemberMenuSql('main','order','Mailbuchung','N','Y',8); + 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'"); // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Weiteren Menü-Query in Erweiterung verlagert."); + setExtensionUpdateNotes("Inkonsistenz in Konfigurationsnamen korregiert."); break; - } + } // END - switch break; case 'modify': // When the extension got modified @@ -330,9 +332,10 @@ INDEX (`pool_id`) case 'init': // Do stuff when extension is initialized // Do daily reset only when installed and extension version is at least 0.1.1 - if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (getExtensionVersion('order') >= '0.1.1')) { + // @TODO This should be moved out to inc/reset/ + if ((isResetModeEnabled()) && (isInstalled()) && (isAdminRegistered()) && (isExtensionInstalledAndNewer('order', '0.1.1'))) { // Reset mail order values - $result_ext = SQL_QUERY("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET mail_orders=0 WHERE mail_orders > 0", __FILE__, __LINE__); + $result_ext = SQL_QUERY('UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `mail_orders`=0 WHERE `mail_orders` > 0', __FILE__, __LINE__); } // END - if break; @@ -340,9 +343,9 @@ INDEX (`pool_id`) break; default: // Unknown extension mode - logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); + logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; -} +} // END - switch // [EOF] ?>