+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 01/22/2013 *
+ * =================== Last change: 01/22/2013 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : mode-update.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Swapped out order system for PRO version *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Ausgelagertes Buchungssytem fuer PRO-Version *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * 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 *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ * This program is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU General Public License *
+ * along with this program; if not, write to the Free Software *
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
+ * MA 02110-1301 USA *
+ ************************************************************************/
+
+// Some security stuff...
+if (!defined('__SECURITY')) {
+ die();
+} // END - if
+
+// @TODO Remove double-tab from all lines
+ 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
+ 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).");
+ 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 <span class=\"bad\">mail_order</span> korregiert auf <span class=\"bad\">mail_orders</span>.");
+ 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 <strong>Patch 340</strong> ü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 <u>member_frameset-back.tpl</u> und <u>member_frameset-send.tpl</u> nach <u>member_order_back.tpl</u> und <u>member_order_send.tpl</u> 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:
+<ol>
+ <li>Das Mitglied wählt eine Kategorie XYZ mit maximal 15 Empfängern aus.</li>
+ <li>Es stellt die Mailart <u>"3 {?POINTS?} Kosten / Mail"</u> ein.</li>
+ <li>Es hat aber nur {?POINTS?} für 10 Empfänger und gibt 10 ein.</li>
+ <li>Das Script hatte bis zu dieser Version 3 {?POINTS?} * <u>15</u> = 45 {?POINTS?} gerechnet, hat das Mitglied mehr oder gleich 45 {?POINTS?}, fiehl dieser Fehler nicht
+ auf.</li>
+ <li>Hatte es aber, wie hier im Beispiel 31 {?POINTS?}, konnte es nicht mehr buchen.</li>
+ <li>Jetzt ist der Fehler endlich weg! Machen Sie dies bitte Ihren Mitgliedern bekannt.</li>
+</ol>");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Fehler mit <u>__MIN_VALUE</u> behoben.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Konstantenproblem beseitigt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Problem mit nicht funktionierenden Mailbuchungen beseitigt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Basis-Modul <strong>order.php</strong> abgesichert, wenn Erweiterung nicht aktiviert ist.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ 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.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Unter <strong>Einstellungen - Mailbuchungsseite</strong> war immer die Tabellenspalte <strong>Mitgliedsnummer</strong> ausgewählt.");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Dateiamenskonflikt zwischen den Erweiterungen <strong>support</strong> und <strong>order</strong> behoben.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Das Mitglied konnte geziehlt die Anzahl Mailbuchungen durch Abspeichern seines Profiles beeinflussen. Der Fehler war eine falsche Tabellenspalte. Dies war <strong>max_mails</strong>, die durch das Mitglieder veränderbar ist und zur Festellung der Maximalen Mailbuchungen herangezogen wurde.");
+ break;
+
+ case '0.3.6': // SQL queries for v0.3.6
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Im Modul order (<strong>inc/modules/order.php</strong>) wurde fehlerhafterweise die Erweiterung <strong>beg</strong> getestet.");
+ break;
+
+ case '0.3.7': // SQL queries for v0.3.7
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("SQL-Anweisungen mit SQL_QUERY_ESC() abgesichert.");
+ break;
+
+ case '0.3.8': // SQL queries for v0.3.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Mailbuchungsseite korregiert.");
+ break;
+
+ case '0.3.9': // SQL queries for v0.3.9
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Erneuten Fehler in Mailbuchungsseite behoben.");
+ break;
+
+ case '0.4.0': // SQL queries for v0.4.0
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("{?POINTS?}-Abzug klappt wieder. Danke an Andreman!");
+ break;
+
+ case '0.4.1': // SQL queries for v0.4.1
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.4.2': // SQL queries for v0.4.2
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Vorbereitung auf die neue Mediendaten v0.0.4.");
+ break;
+
+ case '0.4.3': // SQL queries for v0.4.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Neue Urlaubsschaltung mit integriert.");
+ break;
+
+ case '0.4.4': // SQL queries for v0.4.4
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ein <strong>WHERE `ext_active`='Y'</strong> tauchte bei einigen Betreibern auf und ist mit dieser Version beseitigt.");
+ break;
+
+ case '0.4.5': // SQL queries for v0.4.5
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("De-/Aktivieren des mit dieser Erweiterung verknüpften Modules eingebunden.");
+ break;
+
+ case '0.4.6': // SQL queries for v0.4.6
+ addMemberMenuSql('order', NULL, 'Mailbuchungen', 3);
+ addMemberMenuSql('order', 'order2', 'Framekiller-Mails', 2);
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='order',`title`='Klick-Mails',`sort`=1 WHERE `what`='order' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Mitgliedsmenü komplett umgebaut.");
+ break;
+
+ case '0.4.7': // SQL queries for v0.4.7
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert.");
+ break;
+
+ case '0.4.8': // SQL queries for v0.4.8
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='Mailbuchung' WHERE `what`='config_order' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Menüpunkt "Mailbuchungsseite" nach "Mailbuchung" umbenannt und weitere Einstellungen aus Sonstige Einstellungen verschoben.");
+ break;
+
+ case '0.4.9': // SQL queries for v0.4.9
+ 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
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.5.1': // SQL queries for v0.5.1
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Nicht mehr gültiges Update.");
+ break;
+
+ case '0.5.2': // SQL queries for v0.5.2
+ addConfigDropSql('test_text');
+ addConfigDropSql('test_subj');
+ 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.");
+ break;
+
+ case '0.5.3': // SQL queries for v0.5.3
+ 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');
+
+ // Register filters for gathering points
+ registerFilter(__FILE__, __LINE__, 'get_total_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'get_own_points', 'ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Weiteres Verwendungszwecke "Werbeguthaben" hinzugefügt (verschoben von ext-user) und neue Filter zum Zurückliefern des Werbeguthabens hinzugefügt.");
+ break;
+
+ case '0.5.4': // SQL queries for v0.5.4
+ // Register filter for handling locked points
+ registerFilter(__FILE__, __LINE__, 'get_locked_points', 'LOCKED_ORDER_POINTS', FALSE, TRUE, isExtensionDryRun());
+
+ // Register filter for all column names
+ registerFilter(__FILE__, __LINE__, 'get_all_point_columns', 'GET_ALL_ORDER_POINTS_COLUMN_NAMES', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt.");
+ break;
+
+ case '0.5.5': // SQL queries for v0.5.5
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'user_exclusion_sql', 'ORDER_ZIP_CODE_SQL', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Filter für gesperrtes Werbeguthaben hinzugefügt.");
+ break;
+
+ case '0.5.6': // SQL queries for v0.5.6
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'locked_points_columns_array', 'ORDER_POINTS_COLUMNS', FALSE, TRUE, isExtensionDryRun());
+
+ // 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 <strong>ext-blacklist</strong> verschoben).");
+ break;
+
+ case '0.5.8': // SQL queries for v0.5.8
+ addConfigAddSql('order_multi_page', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Spalte wird nun in dieser Erweiterung hinzugefügt (vorher: allgemeine <strong>tables.sql</strong>).");
+ break;
+ } // END - switch
+
+// [EOF]
+?>