- case "0.2.1": // SQL queries for v0.2.1
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
- break;
-
- case "0.2.2": // SQL queries for v0.2.2
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Anrede "Firma" hinzugefügt.");
- break;
-
- case "0.2.3": // SQL queries for v0.2.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Datumsformat festgelegt auf ausführlich.");
- break;
-
- case "0.2.4": // SQL queries for v0.2.4
- // 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.2.5": // SQL queries for v0.2.5
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("SQL-Anweisungen abgesichert.");
- break;
-
- case "0.2.6": // SQL queries for v0.2.6
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Abspeichern von Einstellungen repariert.");
- break;
-
- case "0.2.7": // SQL queries for v0.2.7
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Sicherheitsupdate für die Include-Befehle.");
- break;
-
- case "0.2.8": // SQL queries for v0.2.8
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
- break;
-
- case "0.2.9": // SQL queries for v0.2.9
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8)");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Admin-Kontaktformular hinzugefügt.");
- break;
-
- case "0.3.0": // SQL queries for v0.3.0
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release.");
- break;
-
- case "0.3.1": // SQL queries for v0.3.1
- ADD_EXT_SQL("UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Verwaltung auf Management umgestellt");
- break;
-
- case "0.3.2": // SQL queries for v0.3.2
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt.");
- break;
-
- case "0.3.3": // SQL queries for v0.3.3
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
- break;
-
- case "0.3.4": // SQL queries for v0.3.4
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0");
-
- // Update notes (these will be set as task text!)
- EXT_SET_UPDATE_NOTES("Mitglieder werden per Zufall als Referal-ID ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist.");
- break;
-
- case "0.3.5": // SQL queries for v0.3.5
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
- ADD_EXT_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30)."");
- ADD_EXT_SQL("INSERT INTO `{!_MYSQL_PREFIX!}_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('user','list_user_del','Löschungen auflisten','Listet die Löschungen von Usern auf.', 9)");
- ADD_EXT_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`");
- ADD_EXT_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_user_del` (
+ case 'update': // Update an extension
+ switch (getCurrentExtensionVersion()) {
+ case '0.1.0': // SQL queries for v0.1
+ addConfigAddSql('user_limit', 'INT(7) UNSIGNED NOT NULL DEFAULT 20');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Seitenweises Anzeigen der User-Liste ist nun möglich.");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // This update depends on sql_patches update!
+ addExtensionDependency('sql_patches');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ungültiges Update.");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `mails_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Dem Mitglied wird nun angezeigt, wie viele Mails er bestätigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr berücksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Den Pfad <em>Sie sind hier</em> im Menüpunkt <u>Online-Liste</u> erweitert.");
+ break;
+
+ case '0.1.4': // SQL queries for v0.1.4
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `emails_received` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Anzahl empfangener Mails wird angezeigt. <big>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?mt_word?} haben sollen!</big>");
+ break;
+
+ case '0.1.5': // SQL queries for v0.1.5
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("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!)
+ setExtensionUpdateNotes("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!)
+ setExtensionUpdateNotes("Erweiterung bleibt wegen integrierten Schalters immer aktiv.");
+ break;
+
+ case '0.1.8': // SQL queries for v0.1.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Seit <strong>Patch 340</strong> überflüssige HTML-Tags entfernt.");
+ break;
+
+ case '0.1.9': // SQL queries for v0.1.9
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Link zum Mitgliedsprofil in Funktion <u>generateUserProfileLink()</u> ausgelagert.");
+ break;
+
+ case '0.2.0': // SQL queries for v0.2.0
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt.");
+ break;
+
+ case '0.2.1': // SQL queries for v0.2.1
+ addConfigAddSql('user_alpha', 'TINYINT(3) UNSIGNED NOT NULL DEFAULT 10');
+ addAdminMenuSql('setup','config_user','Mitgliederliste','Anzahl Mitglieder pro Seite, Anzahl Buchstaben pro Zeile usw.', 8);
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("User-Liste ist konfigurierbar: Anzahl Mitglieder pro Seite und Anzahl Buchstaben pro Zeile; Template-Fehler beseitigt.");
+ break;
+
+ case '0.2.2': // SQL queries for v0.2.2
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `gender` `gender` ENUM('M','F','C') NOT NULL DEFAULT 'M'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Anrede "Firma" hinzugefügt.");
+ break;
+
+ case '0.2.3': // SQL queries for v0.2.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Datumsformat festgelegt auf ausführlich.");
+ break;
+
+ case '0.2.4': // SQL queries for v0.2.4
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Wörter <strong>{?mt_word?}</strong>, <strong>{?mt_word2?}</strong> und <strong>{?mt_word3?}</strong> sind austauschbar.");
+ break;
+
+ case '0.2.5': // SQL queries for v0.2.5
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("SQL-Anweisungen abgesichert.");
+ break;
+
+ case '0.2.6': // SQL queries for v0.2.6
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.2.7': // SQL queries for v0.2.7
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.2.8': // SQL queries for v0.2.8
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("if-Anweisungen auf Funktion <strong>empty()</strong> umgestellt.");
+ break;
+
+ case '0.2.9': // SQL queries for v0.2.9
+ addAdminMenuSql('user','user_contct','Mitglied kontaktieren','Kontaktieren Sie hier Ihre Mitglieder ganz direkt über ein Webformular. Sie brauchen somit kein EMail-Programm mehr starten!', 8);
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Admin-Kontaktformular hinzugefügt.");
+ break;
+
+ case '0.3.0': // SQL queries for v0.3.0
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Hash-Erstellung von <strong>md5()</strong> auf bessere Funktion <strong>generateHash()</strong> umgestellt.<br />Diverse Fixes für <em>0.2.1-Beta1</em> Release.");
+ break;
+
+ case '0.3.1': // SQL queries for v0.3.1
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title` = 'Mitglieder-Management' WHERE `action`='user' AND (`what`='' OR `what` IS NULL) LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Verwaltung auf Management umgestellt");
+ break;
+
+ case '0.3.2': // SQL queries for v0.3.2
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("PHP-Hinweis in Userauflistung gefixt (trat bei fehlender Erweiterung <span class=\"data\">ext-nickname</span> auf) und Darstellungsfehler von <strong>0.00000</strong> unbestätigten Mails gefixt.");
+ break;
+
+ case '0.3.3': // SQL queries for v0.3.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Mitglieder sind nun per Formular kontaktierbar (es wird eine EMail versendet), gesperrte und bestätigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)");
+ break;
+
+ case '0.3.4': // SQL queries for v0.3.4
+ addConfigAddSql('select_user_zero_refid', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
+ addConfigAddSql('user_min_confirmed', 'SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10');
+ addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `rand_confirmed` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Mitglieder werden per Zufall als Referal-Id ausgewählt, die eine Mindestanzahl an bestätigten Mails haben, wenn die Ref-Id 0 ist.");
+ break;
+
+ case '0.3.5': // SQL queries for v0.3.5
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_reason` TINYTEXT");
+ addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'");
+ addConfigAddSql('user_delete_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 30));
+ addAdminMenuSql('user', 'list_user_del', 'Löschungen auflisten', 'Listet die Löschungen von Usern auf.', 9);
+ addDropTableSql('user_del');
+ addCreateTableSql('user_del', "(