X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-transfer.php;h=78a67b4fb7f7de575e1343ecaa6f025277096020;hp=751e7593cee97a4d3ebb9974896cc6623cd2d3bc;hb=0485db3873ab91056df581db03c3d99df2882d20;hpb=508228c85fba8448d00865b1639cb8cd7a69e457 diff --git a/inc/extensions/ext-transfer.php b/inc/extensions/ext-transfer.php index 751e7593ce..78a67b4fb7 100644 --- a/inc/extensions/ext-transfer.php +++ b/inc/extensions/ext-transfer.php @@ -10,14 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Punktetransfers zwischen Mitgliedern * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * + * $Revision:: $ * * $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 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -38,259 +38,260 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); + die(); } // Version number -EXT_SET_VERSION("0.2.9"); +setThisExtensionVersion('0.2.9'); -// Version history array (add more with , "0.1" and so on) -EXT_SET_VER_HISTORY(array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "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")); +// Version history array (add more with , '0.1.0' and so on) +setExtensionVersionHistory(array('0.0', '0.0.1', '0.0.2', '0.0.3', '0.0.4', '0.0.5', '0.0.6', '0.0.7', '0.0.8', '0.0.9', '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')); -switch ($EXT_LOAD_MODE) -{ -case "register": // Do stuff when installation is running - // SQL commands to run - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); +switch (getExtensionMode()) { + case 'register': // Do stuff when installation is running + // SQL commands to run + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`"); - // Transfer from a member - ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_in` ( + // Transfer from a member + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_in` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -from_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +from_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), -KEY (from_uid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); +KEY (from_userid), +PRIMARY KEY (id) +) Type={?_TABLE_TYPE?}"); - // Transfers to a member - ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_transfers_out` ( + // Transfers to a member + addExtensionSql("CREATE TABLE `{?_MYSQL_PREFIX?}_user_transfers_out` ( id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, -to_uid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, +to_userid BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, points BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, reason VARCHAR(255) NOT NULL DEFAULT '', time_trans VARCHAR(14) NOT NULL DEFAULT 0, trans_id VARCHAR(12) NOT NULL DEFAULT '', KEY (userid), -KEY (to_uid), -PRIMARY KEY(id) -) Type={!_TABLE_TYPE!}"); - - // Admin menu - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer', NULL, '{!POINTS!}-Transfer','Verwalten Sie hier die {!POINTS!}-Transaktionen zwischen Ihren Mitgliedern.', 7)"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1)"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2)"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3)"); - - // Member menu - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`visible`,`locked`,`sort`) VALUES ('main','transfer','{!POINTS!}-Transfer','Y','Y', 5)"); - - // Add config values - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('one_day')*28)."'"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('one_day')."'"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); - - // Add row(s) to user's data - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); - break; - -case "remove": // Do stuff when removing extension - // SQL commands to run - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_in`"); - ADD_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_transfers_out`"); - ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `action`='transfer' LIMIT 4"); - ADD_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_member_menu` WHERE `what`='transfer' LIMIT 1"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` DROP opt_in"); - break; - -case "activate": // Do stuff when admin activates this extension - // SQL commands to run - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); - break; - -case "deactivate": // Do stuff when admin deactivates this extension - // SQL commands to run - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); - break; - -case "update": // Update an extension - switch ($EXT_VER) - { - case "0.0.2": // SQL queries for v0.0.2 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227
behoben."); +KEY (to_userid), +PRIMARY KEY (id) +) Type={?_TABLE_TYPE?}"); + + // Admin menu + addAdminMenuSql('transfer', NULL, '{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','Verwalten Sie hier die {OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transaktionen zwischen Ihren Mitgliedern.', 7); + addAdminMenuSql('transfer','list_transfer','Auflisten','Hier bekommen Sie alle ein- und ausgehende Transaktionen aufgelistet.', 1); + addAdminMenuSql('transfer','config_transfer','Einstellungen','Stellen Sie ein, wie viele Transaktionen aufgelistet werden sollen und wie alt diese werden dürfen. Die evtl. installierte autopurge-Erweiterung kann dann automatisch die veralteten Transktionen löschen.', 2); + addAdminMenuSql('transfer','del_transfer','Manuell löschen','Hier können Sie - abgesehen von der automatischen Löschung - Transaktionen selber löschen. Bitte beachten Sie, dass immer aus- und eingehende Transaktionen gleichzeitig gelöscht werden.', 3); + + // Member menu + addMemberMenuSql('main','transfer','{OPEN_CONFIG}POINTS{CLOSE_CONFIG}-Transfer','N','Y', 5); + + // Add config values + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_max BIGINT(20) UNSIGNED NOT NULL DEFAULT '50'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_age BIGINT(20) UNSIGNED NOT NULL DEFAULT '".(getConfig('ONE_DAY')*28)."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_timeout BIGINT(20) UNSIGNED NOT NULL DEFAULT '".getConfig('ONE_DAY')."'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_balance BIGINT(20) UNSIGNED NOT NULL DEFAULT 100"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD transfer_code BIGINT(20) UNSIGNED NOT NULL DEFAULT 5"); + + // Add row(s) to user's data + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD opt_in ENUM('Y','N') NOT NULL DEFAULT 'N'"); break; - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion ADMIN_SAVE_SETTINGS() erledigt."); + case 'remove': // Do stuff when removing extension + // SQL commands to run + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_in`"); + addExtensionSql("DROP TABLE IF EXISTS `{?_MYSQL_PREFIX?}_user_transfers_out`"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `action`='transfer'"); + addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_member_menu` WHERE `what`='transfer'"); + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` DROP `opt_in`"); break; - case "0.0.3": // SQL queries for v0.0.3 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + 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 `what`='transfer' LIMIT 1"); break; - case "0.0.5": // SQL queries for v0.0.5 - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"); - break; - - case "0.0.6": // SQL queries for v0.0.6 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); - break; - - case "0.0.7": // SQL queries for v0.0.7 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); - break; - - case "0.0.8": // SQL queries for v0.0.8 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit E in Transaktionsnummer beseitigt."); - break; - - case "0.0.9": // SQL queries for v0.0.9 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Problem mit Speicherung der Einstellungen beseitigt."); - break; - - case "0.1.0": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Menüpunkte im Gast-/Mitgliedsbereich können nicht mehr aufgerufen werden, wenn die Erweiterung deaktiviert ist."); - break; - - case "0.1.1": // SQL queries for v0.1.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Design "Solid-Business" eingebaut."); - break; - - case "0.1.2": // SQL queries for v0.1.2 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; - - case "0.1.3": // SQL queries for v0.1.3 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); - break; - - case "0.1.4": // SQL queries for v0.1.4 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); - break; - - case "0.1.5": // SQL queries for v0.1.5 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Template admin_config_transfer_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); - break; - - case "0.1.6": // SQL queries for v0.1.6 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='transfer' LIMIT 1"); break; - case "0.1.7": // SQL queries for v0.1.7 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Wort Punkte dynamisiert."); + case 'update': // Update an extension + switch (getCurrentExtensionVersion()) { + case '0.0.2': // SQL queries for v0.0.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler
Warning: Missing argument 2 for create_timestamp_from_selections() in {?PATH?}inc/libs/pro_functions.php on line 227
behoben."); + break; + + case '0.0.3': // SQL queries for v0.0.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Überflüssige unset()-Anweisungen aus der what-config_transfer.php entfernt. Dies wird bereits von der eigenen Funktion adminSaveSettings() erledigt."); + break; + + case '0.0.3': // SQL queries for v0.0.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlende Abfrage im Mitlieder-Modul, on Erweiterung auch aktiviert ist."); + break; + + case '0.0.5': // SQL queries for v0.0.5 + addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_config` ADD ap_transfer ENUM('Y','N') NOT NULL DEFAULT 'Y'"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Link Auflisten im Admin-Bereich hatte das eingeloggte Mitglied und nicht den eingeloggten Admin abgefragt. Automatisches Löschen von veraltete Einträgen kann unabhängig von der autopurge-Erweiterung de-/aktiviert werden. Bitte aktualisieren Sie auch die beiden Admin-Templates!"); + break; + + case '0.0.6': // SQL queries for v0.0.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Wegen des Theme-Supportes hat sich die URL zur CSS-Datei geändert."); + break; + + case '0.0.7': // SQL queries for v0.0.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist."); + break; + + case '0.0.8': // SQL queries for v0.0.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Problem mit E in Transaktionsnummer beseitigt."); + break; + + case '0.0.9': // SQL queries for v0.0.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Problem mit Speicherung der Einstellungen beseitigt."); + break; + + case '0.1.0': // SQL queries for v0.2.1 + // 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.1.1': // SQL queries for v0.1.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Design "Solid-Business" eingebaut."); + break; + + case '0.1.2': // SQL queries for v0.1.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Seit Patch 340 überflüssige HTML-Tags entfernt."); + break; + + case '0.1.3': // SQL queries for v0.1.3 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("IP-Nummer und Browserbezeichnung wird in Admin-Mails eingesetzt."); + break; + + case '0.1.4': // SQL queries for v0.1.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion generateUserProfileLink() ausgelagert."); + break; + + case '0.1.5': // SQL queries for v0.1.5 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Template admin_config_transfer_pro.tpl ist überflüssig geworden. Bitte löschen Sie dies!"); + break; + + case '0.1.6': // SQL queries for v0.1.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); + break; + + case '0.1.7': // SQL queries for v0.1.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Wort Punkte dynamisiert."); + break; + + case '0.1.8': // SQL queries for v0.1.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + break; + + case '0.1.9': // SQL queries for v0.1.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Parser-Error im Mitgliedsbereich beseitigt."); + break; + + case '0.2.0': // SQL queries for v0.2.0 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Abspeichern von Einstellungen repariert."); + break; + + case '0.2.1': // SQL queries for v0.2.1 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Durchführung des Transfers korregiert."); + break; + + case '0.2.2': // SQL queries for v0.2.2 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle."); + break; + + case '0.2.3': // SQL queries for v0.2.3 + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"); + addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"); + + // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin + addExtensionUpdateDependency('sql_patches'); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Erweiterung in's neue Menüsystem integriert."); + break; + + case '0.2.4': // SQL queries for v0.2.4 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Touring-Code wiederholen nach Touring-Code eingeben hin geändert."); + break; + + case '0.2.5': // SQL queries for v0.2.5 + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='extras', `sort`=5 WHERE `what`='transfer' LIMIT 1"); + + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Mitgliedsmenü komplett geändert."); + break; + + case '0.2.6': // SQL queries for v0.2.6 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); + break; + + case '0.2.7': // SQL queries for v0.2.7 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Die {?POINTS?} können nun wieder wie gewohnt transferiert werden. Der Grund für {--TRANSFER_INVALID_PASSWORD--} war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"); + break; + + case '0.2.8': // SQL queries for v0.2.8 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlermeldung Notice: Undefined index: to_userid in {?PATH?}/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."); + break; + + case '0.2.9': // SQL queries for v0.2.9 + // Update notes (these will be set as task text!) + setExtensionUpdateNotes("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); + break; + } break; - case "0.1.8": // SQL queries for v0.1.8 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("HTML-Code ausgelagert in Templates und SQL-Anweisungen abgesichert."); + case 'modify': // When the extension got modified break; - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Parser-Error im Mitgliedsbereich beseitigt."); + case 'test': // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. break; - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert."); + case 'init': // When extension is initialized + if ((isResetModeEnabled()) && (getConfig('ap_transfer') == 'Y')) { + // Automatically remove outdated or not displayed transactions + autoPurgeTransfers(getConfig('transfer_max'), getConfig('transfer_age')); + } // END - if break; - case "0.2.1": // SQL queries for v0.2.1 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Durchführung des Transfers korregiert."); + default: // Unknown extension mode + DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown extension mode %s detected.", getExtensionMode())); break; - - case "0.2.2": // SQL queries for v0.2.2 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle."); - break; - - case "0.2.3": // SQL queries for v0.2.3 - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'list_transfer')"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('member', '', 'del_transfer')"); - ADD_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu_las` (la_id, la_action, la_what) VALUES ('config', '', 'config_transfer')"); - - // Depends on sql_patches (or you have to execute these both SQL statements by phpMyAdmin - EXT_SET_UPDATE_DEPENDS("sql_patches"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Erweiterung in's neue Menüsystem integriert."); - break; - - case "0.2.4": // SQL queries for v0.2.4 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Touring-Code wiederholen nach Touring-Code eingeben hin geändert."); - break; - - case "0.2.5": // SQL queries for v0.2.5 - ADD_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='5' WHERE `what`='transfer' LIMIT 1"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Mitgliedsmenü komplett geändert."); - break; - - case "0.2.6": // SQL queries for v0.2.6 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Hash-Erstellung von md5() auf bessere Funktion generateHash() umgestellt."); - break; - - case "0.2.7": // SQL queries for v0.2.7 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Die {!POINTS!} können nun wieder wie gewohnt transferiert werden. Der Grund für {--TRANSFER_INVALID_PASSWORD--} war, dass der Cookie-Hash ein anderer ist, als der in der Datenbank... :-/"); - break; - - case "0.2.8": // SQL queries for v0.2.8 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlermeldung Notice: Undefined index: to_uid in {!PATH!}/inc/modules/member/what-transfer.php on line 301 gefixt. Danke an Piter01."); - break; - - case "0.2.9": // SQL queries for v0.2.9 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Fehlerhinweis bei deaktivierter Erweiterung verbessert."); - break; - } - break; - -case "modify": // When the extension got modified - break; - -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; - -default: // Do stuff when extension is loaded - if ((isResetModeEnabled()) && (getConfig('ap_transfer') == "Y")) { - // Automatically remove outdated or not displayed transactions - TRANSFER_AUTPPURGE(getConfig('transfer_max'), getConfig('transfer_age')); - } - break; } -// +// [EOF] ?>