+<?php
+/************************************************************************
+ * Mailer v0.2.1-FINAL Start: 07/31/2013 *
+ * =================== Last change: 07/31/2013 *
+ * *
+ * -------------------------------------------------------------------- *
+ * File : mode-update.php *
+ * -------------------------------------------------------------------- *
+ * Short description : Wernis extension *
+ * -------------------------------------------------------------------- *
+ * Kurzbeschreibung : Auszahlung-Erweiterung *
+ * -------------------------------------------------------------------- *
+ * $Revision:: $ *
+ * $Date:: $ *
+ * $Tag:: 0.2.1-FINAL $ *
+ * $Author:: $ *
+ * -------------------------------------------------------------------- *
+ * Copyright (c) 2003 - 2009 by Roland Haeder *
+ * Copyright (c) 2009 - 2013 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
+
+// All updates
+switch (getCurrentExtensionVersion()) {
+ case '0.0.1': // SQL queries for v0.0.1
+ addConfigAddSql('wernis_payout_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('wernis_withdraw_active', "ENUM ('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('wernis_payout_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
+ addConfigAddSql('wernis_withdraw_factor', 'FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 1.00000');
+ addConfigAddSql('wernis_payout_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+ addConfigAddSql('wernis_withdraw_fee_percent', 'FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000');
+ addConfigAddSql('wernis_payout_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+ addConfigAddSql('wernis_withdraw_fee_fix', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ein-/Auszahlungsfunktion getrennt ein- und ausschaltbar, sowie mit Umrechungsfaktoren {?POINTS?}->Wernis versehen. Prozentualer Abzug als "Betreibergebühr hinzugefügt, was z.B. für Wechselstuben interessant ist.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ addConfigAddSql('wernis_pass_md5', "VARCHAR(32) NOT NULL DEFAULT ''");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Auszahlungsfunktion an die neue API 0.2-BETA angepasst. Demnach muss Ihr Wernis-Passwort beim Auszahlen benutzt werden und in Ihrem {?mt_word?} als MD5-Hash gespeichert werden.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ addConfigAddSql('wernis_refid', 'INT(5) UNSIGNED ZEROFILL NOT NULL DEFAULT 00000');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("WDS66-Username muss nun eintragen werden (API-Anpassung).");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Register points data
+ registerExtensionPointsData('wernis_withdraw', 'order_points', 'LOCKED', 'DIRECT');
+
+ // Update notes
+ setExtensionUpdateNotes("Überweisungen vom Portal werden nun über die Tabelle <strong>{OPEN_CONFIG}_MYSQL_PREFIX{CLOSE_CONFIG}_points_data</strong> verwaltet.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ addExtensionChangeTableColumnSql('user_wernis', 'wernis_type', 'wernis_type', "ENUM('WITHDRAW','PAYOUT','FAILED') NOT NULL DEFAULT 'FAILED'");
+
+ // Update notes
+ setExtensionUpdateNotes("IN/OUT ersetzt mit WITHDRAW/PAYOUT.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ addExtensionChangeTableColumnSql('config', 'wernis_pass_md5', 'wernis_pass_md5', " VARCHAR(255) NOT NULL DEFAULT ''");
+
+ // Update notes
+ setExtensionUpdateNotes("Es wird seit API-Version 0.6-BETA SHA256 (hexadezimal kodiert) verwendet.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // This update depends on ext-register and ext-user
+ addExtensionDependency('register');
+ addExtensionDependency('user');
+
+ // Add data to both tables
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_user_register_provider` (`provider_name`, `provider_extension`) VALUES ('wernis_user_registration', 'wernis')");
+ addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_user_login_provider` (`provider_name`, `provider_extension`) VALUES ('wernis_user_login', 'wernis')");
+
+ // Register all filters
+ registerFilter(__FILE__, __LINE__, 'user_registration', 'WERNIS_USER_REGISTRATION', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'user_registration_done', 'WERNIS_USER_REGISTRATION_DONE', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'user_registration_failed', 'WERNIS_USER_REGISTRATION_FAILED', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'user_registration_form', 'WERNIS_USER_REGISTRATION_FORM', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'user_login', 'WERNIS_USER_LOGIN', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'check_user_registration', 'WERNIS_USER_REGISTRATION_CHECK', FALSE, TRUE, isExtensionDryRun());
+ registerFilter(__FILE__, __LINE__, 'check_user_login', 'WERNIS_USER_LOGIN_CHECK', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes
+ setExtensionUpdateNotes("Anmeldung ürber WDS66 API angefangen: Filter registriert.");
+ break;
+} // END - switch
+
+// [EOF]
+?>