X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-order.php;h=77f9ac1016f10d9218b120b0760ef7288d32c39b;hp=085a001bb8b4f3c1ea028db68642a45764405244;hb=84dd2fecd5b013cf6f4c4e7dee8b0d470b6a5f5c;hpb=c6e62b16b4474ead6b180a5b9648906459d846da diff --git a/inc/extensions/ext-order.php b/inc/extensions/ext-order.php index 085a001bb8..77f9ac1016 100644 --- a/inc/extensions/ext-order.php +++ b/inc/extensions/ext-order.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -41,288 +41,44 @@ if (!defined('__SECURITY')) { } // END - if // Version number -setThisExtensionVersion('0.5.2'); +setThisExtensionVersion('0.5.8'); -// 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', '0.5.2')); +// 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', '0.5.7', '0.5.8')); switch (getExtensionMode()) { - case 'register': // Do stuff when installation is running (modules.php?module=admin is called) + case 'setup': // Do stuff when installation is running // SQL commands to run - addMemberMenuSql('order','order','Mailbuchung','N','Y',1); + 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'"); + + // Remove these filters + unregisterFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', TRUE, isExtensionDryRun()); + unregisterFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', TRUE, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `action`='order'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='N', `locked`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `action`='order'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='N',`locked`='N',`admin_only`='N',`mem_only`='Y' WHERE `module`='order' LIMIT 1"); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N', `locked`='Y' WHERE `action`='order'"); - addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='Y', `locked`='Y' WHERE `module`='order' LIMIT 1"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N',`locked`='Y' WHERE `action`='order'"); + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_mod_reg` SET `hidden`='Y',`locked`='Y' WHERE `module`='order' LIMIT 1"); break; case 'update': // Update an extension - switch (getCurrentExtensionVersion()) { - case '0.1.0': // SQL queries for v0.1 - 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!) - setExtensionUpdateNotes("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig."); - break; - - case '0.1.1': // SQL queries for v0.1.1 - // OLD QUERIES: addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='config_order' LIMIT 1"); - // OLD QUERIES: addAdminMenuSql('setup','config_order','Mailbuchungsseite','Einstellungen am Mailbuchungsformular.',7); - addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `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)."); - break; - - case '0.1.3': // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Maximale Mailbuchungen repariert (werden nun hochgezählt und bei täglichem Reset auf 0 gesetzt)."); - break; - - case '0.1.4': // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte mail_order korregiert auf mail_orders."); - break; - - case '0.1.5': // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.6': // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.7': // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case '0.1.8': // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); - break; - - case '0.1.9': // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); - break; - - case '0.2.0': // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; - - case '0.2.1': // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Templates member_frameset-back.tpl und member_frameset-send.tpl nach member_order_back.tpl und member_order_send.tpl umbenannt."); - break; - - case '0.2.2': // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Es wird nun überprüft ob auch genügend Empfänger eingegeben worden sind und ob auch genügend empfangsbereit sind."); - break; - - case '0.2.3': // SQL queries for v0.2.3 - 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. Standard: 10 Empfänger"); - break; - - case '0.2.4': // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Anzahl mindestens einszustellende Empfänger wird nun auch angezeigt."); - break; - - case '0.2.5': // SQL queries for v0.2.5 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Speicherung der Einstellungen klappt."); - break; - - case '0.2.6': // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - setExtensionUpdateNotes("Fehler in Mailbuchung behoben: Es wurde beim Ermitteln der nötigen {?POINTS?} die maximale Anzahl von Usern in der Kategorie gewählt und -nicht die vom Mitglied eingegebene. Resultat: Das Script beschwerte sich, der User hätte nicht genügend {?POINTS?} auf dem Konto. Ein Rechenbeispiel: -