- // 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 <div class=\"admin_failed\">Warning: Missing argument 2 for create_timestamp_from_selections() in {!PATH!}inc/libs/pro_functions.php on line 227</div> behoben.");
- 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.");
- 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.");
- 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 <em>Auflisten</em> 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 <a href=\"#\">Patch 340</a> ü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 <u>ADMIN_USER_PROFILE_LINK()</u> 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 <u>admin_config_transfer_pro.tpl</u> 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 <strong>Mailtausch</strong>, <strong>Mailtausches</strong> und <strong>Mailtauscher</strong> sind austauschbar.");
- 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 <strong>Punkte</strong> dynamisiert.");
- 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.");
- 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.");
- 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.");
- 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.");
- 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");