+ case 'update': // Update an extension
+ switch (getCurrentExtensionVersion()) {
+ case '0.0.1': // SQL queries for v0.0.1
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("HTML-Code für ein Zeilen-Template ausgelagert.");
+ break;
+
+ case '0.0.2': // SQL queries for v0.0.2
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Abspeichern von Einstellungen repariert.");
+ break;
+
+ case '0.0.3': // SQL queries for v0.0.3
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Im Menüpunkt "Prüfen" wurden die bereits installierten und auch aktuellen Themes nicht ausgeblendet.");
+ break;
+
+ case '0.0.4': // SQL queries for v0.0.4
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Sicherheitsupdate für die Include-Befehle.");
+ break;
+
+ case '0.0.5': // SQL queries for v0.0.5
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("<strong>setSession()</strong> mit @-Zeichen gegen ungewollte Ausgaben abgesichert.");
+ break;
+
+ case '0.0.6': // SQL queries for v0.0.6
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Variablen-Handling scripteweit geändert.");
+ break;
+
+ case '0.0.7': // SQL queries for v0.0.7
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ungültiges Update.");
+ break;
+
+ case '0.0.8': // SQL queries for v0.0.8
+ // Theme table
+ addDropTableSql('themes');
+ addCreateTableSql('themes', "
+`id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`theme_path` VARCHAR(255) NOT NULL DEFAULT '',
+`theme_name` VARCHAR(255) NOT NULL DEFAULT '',
+`theme_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+`theme_ver` VARCHAR(255) NOT NULL DEFAULT '0.0.0',
+PRIMARY KEY (`id`),
+UNIQUE INDEX (`theme_path`),
+INDEX (`theme_active`)", 'Themes');
+
+ // Admin menu
+ addAdminMenuSql('theme', NULL, 'Themes', 'Verwalten Sie hier alle Designs (Themes) Ihres {OPEN_CONFIG}mt_word2{CLOSE_CONFIG}.', 8);
+ addAdminMenuSql('theme', 'theme_import', 'Importieren', 'Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1);
+ addAdminMenuSql('theme', 'theme_edit', 'Modifizieren', 'Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standard-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2);
+
+ // Guest menu
+ addGuestMenuSql('themes', NULL, 'Design-Auswahl', 4);
+
+ // Memember menu
+ addMemberMenuSql('themes', NULL, 'Design-Auswahl', 3);
+ addMemberMenuSql('main', 'themes', 'Designs', 6);
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `sort`=8 WHERE `action`='themes' LIMIT 1");
+ addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account',`sort`=1,`title`='Designs' WHERE `what`='themes' LIMIT 1");
+
+ // User data
+ addExtensionAddTableColumnSql('user_data', 'curr_theme', "VARCHAR(255) NOT NULL DEFAULT 'default'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Update von <u>sql_patches</u> übertragen. (Kann Fehlermeldungen verursacht haben!)");
+ break;
+
+ case '0.0.9': // SQL queries for v0.0.9
+ // Config SQL
+ addConfigAddSql('default_theme', "VARCHAR(255) NOT NULL DEFAULT 'default'");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Fehlende Konfiguration hinzugefügt.");
+ break;
+
+ case '0.1.0': // SQL queries for v0.1.0
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'init', 'HANDLE_THEME_CHANGE', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Ändern des Designs nun im Filter (internes TODO).");
+ break;
+
+ case '0.1.1': // SQL queries for v0.1.1
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'member_login_check', 'SET_USERS_THEME', FALSE, TRUE, isExtensionDryRun());
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Setzen des Mitgliedes' eigener Design-Auswahl per Filter (internes TODO).");
+ break;
+
+ case '0.1.2': // SQL queries for v0.1.2
+ // Remove deprecated menu
+ addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='theme_check' LIMIT 1");
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Nicht mehr benötigtes Menü zum Prüfen von Theme-Versionen entfernt.");
+ break;
+
+ case '0.1.3': // SQL queries for v0.1.3
+ // Register filter
+ registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'THEME_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun());
+
+ // This depends on ext-register
+ addExtensionDependency('register');
+
+ // Update notes (these will be set as task text!)
+ setExtensionUpdateNotes("Filter für Mitgliederanmeldung hinzugefügt.");
+ break;
+ } // END - switch