X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-wernis.php;h=24634ea2c2798c7435a825c9895d7d0c507f19b1;hb=82d53dfb7f59fa1e37bd500e3db3d10a9d4a78da;hp=6ad1238c1029a267e64ce3ef947b9cc7e164df21;hpb=8127c0351f2fe329e72d9fd302ba3c5f30d1fab0;p=mailer.git diff --git a/inc/extensions/ext-wernis.php b/inc/extensions/ext-wernis.php index 6ad1238c10..24634ea2c2 100644 --- a/inc/extensions/ext-wernis.php +++ b/inc/extensions/ext-wernis.php @@ -39,13 +39,13 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) } // Version of this extension -$EXT_VERSION = "0.0"; +$EXT_VERSION = "0.0.1"; // Auto-set extension version if (empty($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0"); +$EXT_VER_HISTORY = array("0.0", "0.0.1"); switch ($EXT_LOAD_MODE) { @@ -66,9 +66,9 @@ PRIMARY KEY(id) ) TYPE=MyISAM"; // Confiuration - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) NOT NULL DEFAULT '40000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) NOT NULL DEFAULT '5000'"; - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) NOT NULL DEFAULT '0'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_payout BIGINT(20) UNSIGNED NOT NULL DEFAULT '40000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_min_withdraw BIGINT(20) UNSIGNED NOT NULL DEFAULT '5000'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_id BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_md5 VARCHAR(32) NOT NULL DEFAULT ''"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_api_url VARCHAR(255) NOT NULL DEFAULT 'http://www.wds66.com/api/'"; $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_refid VARCHAR(6) NOT NULL DEFAULT ''"; @@ -82,14 +82,18 @@ PRIMARY KEY(id) $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (action, what, title, descr, sort) VALUES('wernis', 'list_wernis', 'Wernis-Anfragen auflisten', 'Listet alle Wernis-Auszahlungsanfragen Ihrer Mitglieder auf.', 2)"; // Member menu - $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES('main', 'wernis', 'Wernis-Ein-/Auszahlungen', 'N', 'N', '11')"; + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, visible, locked, sort) VALUES('main', 'wernis', 'Wernis-Ein-/Auszahlungen', 'N', 'N', 11)"; + + // Guest menu + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action, what, title, visible, locked, sort) VALUES('main', 'wernis_portal', 'WDS66-News', 'N', 'N', 7)"; break; case "remove": // Do stuff when removing extension // SQL commands to run $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_wernis"; $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE action='wernis'"; - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='main' AND what='wernis' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE what='wernis' LIMIT 1"; + $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE what='wernis_portal' LIMIT 1"; break; case "activate": // Do stuff when admin activates this extension @@ -106,8 +110,17 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.0.1": // SQL queries for v0.0.1 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_active ENUM ('Y', 'N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_active ENUM ('Y', 'N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_factor DOUBLE(20,5) UNSIGNED NOT NULL DEFAULT 1.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_percent FLOAT(8,5) UNSIGNED NOT NULL DEFAULT 0.00000"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_payout_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD wernis_withdraw_fee_fix BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + // Update notes (these will be set as task text!) - $UPDATE_NOTES = ""; + $UPDATE_NOTES = "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; } break;