-switch ($EXT_LOAD_MODE)
-{
-case 'register': // Do stuff when installation is running (modules.php?module=admin&action=login is called)
- // SQL commands to run
- ADD_EXT_SQL("");
- break;
-
-case 'remove': // Do stuff when removing extension
- // SQL commands to run
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order'");
- break;
-
-case 'activate': // Do stuff when admin activates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='Y', `locked`='N' WHERE `what`='order' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `locked`='N', `hidden`='N', `admin_only`='N', `mem_only`='Y' WHERE `module`='order' LIMIT 1");
- break;
-
-case 'deactivate': // Do stuff when admin deactivates this extension
- // SQL commands to run
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `visible`='N', `locked`='Y' WHERE `what`='order' LIMIT 1");
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_mod_reg` SET `visible`='N', `locked`='Y' WHERE `module`='order' LIMIT 1");
- break;
-
-case 'update': // Update an extension
- switch ($EXT_VER)
- {
- case '0.1.0': // SQL queries for v0.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_max_full ENUM('ORDER','MAX') NOT NULL DEFAULT 'MAX'");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Maximale Mailbuchungen sind nun vom maximalen Empfang abhägig.");
- break;
-
- case '0.1.1': // SQL queries for v0.1.1
- ADD_EXT_SQL("DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='config_order' LIMIT 1");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`sort`,`descr`) VALUES ('setup','config_order','Mailbuchungsseite','7','Einstellungen am Mailbuchungsformular.')");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD mail_orders BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("Dummy-Datenfeld wird wieder gelöscht, um Probleme zu vermeiden. Fehlende Spalte <em>mail_order</em> korregiert auf <em>mail_orders</em>.");
- break;
-
- case '0.1.5': // SQL queries for v0.1.5
- // 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.1.6': // SQL queries for v0.1.6
- // 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.1.7': // SQL queries for v0.1.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.1.8': // SQL queries for v0.1.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("Seit <a href=\"#\">Patch 340</a> ü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!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("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
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD order_min BIGINT(20) UNSIGNED NOT NULL DEFAULT 10");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Minimum an Empfänger pro Mailbuchung einstellbar. Standart: 10 Empfänger");
- break;
-
- case '0.2.4': // SQL queries for v0.2.4
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("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!)
- EXT_SET_UPDATE_NOTES("Speicherung der Einstellungen klappt.");
- break;
-
- case '0.2.6': // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("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>");