category connection data'); addDropTableSql('user_data'); addCreateTableSql('user_data', " `userid` BIGINT(20) NOT NULL AUTO_INCREMENT, `surname` VARCHAR(255) NOT NULL DEFAULT '', `family` VARCHAR(255) NOT NULL DEFAULT '', `street_nr` VARCHAR(255) NOT NULL DEFAULT '', `country` VARCHAR(4) NOT NULL DEFAULT '', `zip` VARCHAR(6) NOT NULL DEFAULT '', `city` VARCHAR(255) NOT NULL DEFAULT '', `email` VARCHAR(255) NOT NULL DEFAULT '', `birth_day` CHAR(2) NOT NULL DEFAULT '01', `birth_month` CHAR(2) NOT NULL DEFAULT '01', `birth_year` VARCHAR(4) NOT NULL DEFAULT '1970', `password` VARCHAR(255) NOT NULL DEFAULT '', `max_mails` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `receive_mails` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `refid` BIGINT(20) NOT NULL DEFAULT 0, `status` ENUM('UNCONFIRMED','CONFIRMED','LOCKED') NOT NULL DEFAULT 'UNCONFIRMED', `user_hash` VARCHAR(255) NULL DEFAULT NULL, `REMOTE_ADDR` VARCHAR(15) NOT NULL DEFAULT '0.0.0.0', `last_online` VARCHAR(10) NOT NULL DEFAULT 0, `last_module` VARCHAR(255) NOT NULL DEFAULT '', `ref_clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `total_logins` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `gender` ENUM('M','F') NOT NULL DEFAULT 'M', `used_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, `emails_sent` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `joined` VARCHAR(10) NOT NULL DEFAULT 0, `last_update` VARCHAR(10) NOT NULL DEFAULT 0, `last_profile_sent` VARCHAR(10) NOT NULL DEFAULT 0, `notified` ENUM('Y','N') NOT NULL DEFAULT 'N', `ref_payout` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, `last_login` VARCHAR(10) NOT NULL DEFAULT 0, `login_failures` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_failure` TIMESTAMP NULL DEFAULT NULL, PRIMARY KEY (`userid`), UNIQUE (`user_hash`), INDEX (`refid`), INDEX `status_mails` (`status`,`max_mails`)", 'Main user data'); addDropTableSql('user_points'); addCreateTableSql('user_points', " `id` BIGINT(20) NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) NOT NULL DEFAULT 0, `ref_depth` TINYINT(3) UNSIGNED NOT NULL DEFAULT 0, `points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, `locked_points` FLOAT(20,5) UNSIGNED NOT NULL DEFAULT 0.00000, PRIMARY KEY (`id`), INDEX (`userid`)", 'User points (no used points)'); addDropTableSql('user_links'); addCreateTableSql('user_links', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `stats_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `link_type` VARCHAR(255) NOT NULL DEFAULT 'NORMAL', PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`stats_id`)", 'Unconfirmed mails per user'); addDropTableSql('user_stats'); addCreateTableSql('user_stats', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `cat_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `payment_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `subject` VARCHAR(255) NOT NULL DEFAULT '', `url` TINYTEXT NOT NULL, `max_rec` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `clicks` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp_ordered` VARCHAR(10) NOT NULL DEFAULT '', `pool_id` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `timestamp_sstart` VARCHAR(10) NOT NULL DEFAULT '', `timestamp_send` VARCHAR(10) NOT NULL DEFAULT '', `is_stats` ENUM('Y','N') NOT NULL DEFAULT 'N', PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`cat_id`), INDEX (`payment_id`), INDEX (`pool_id`)", 'Mail statistics per user order'); addDropTableSql('user_stats_data'); addCreateTableSql('user_stats_data', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown', `stats_data` VARCHAR(255) NOT NULL DEFAULT '', `inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), INDEX (`userid`), INDEX (`stats_type`)", 'Member statistics data'); // Admin menu addAdminMenuSql('user', NULL, 'Mitglieder-Management', 'Mitglieder freischalten, sperren, Accounts editieren, Neuanmeldungen verwalten, {OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben und abziehen und und und...', 3); addAdminMenuSql('user', 'del_user', 'Mitglied löschen', 'Löschen Sie hier Mitglied, die gegen die AGBs mehrmals verstossen haben. Bitte seien Sie nett zu Ihren Mitgliedern und löschen Sie nicht gleich.', 1); addAdminMenuSql('user', 'lock_user', 'Mitglied sperren / entsperren', 'Sperren Sie Mitglied, die zu viele unbestätigte Mails haben oder gegen Ihre AGBs verstossen haben über diesen Menüpunkt.', 3); addAdminMenuSql('user', 'list_user', 'Mitglied auflisten', 'Listen Sie alle Mitglied oder eingeschränkt nach Suchkritieren Ihre Userdatenbank auf. Sie könen per Klick auf die Usernummer sich Details zum Mitglied ansehen.', 4); addAdminMenuSql('user', 'add_points', '{OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben', 'Buchen Sie einem Mitglied direkt {OPEN_CONFIG}POINTS{CLOSE_CONFIG} auf. Sie können dazu auch einen Kommentar mitsenden.', 5); addAdminMenuSql('user', 'edit_user', 'Account editieren', 'Daten eines Mitglieder-Accountes ändern.', 6); addAdminMenuSql('user', 'list_refs', 'Referrals anzeigen', 'Mit diesem Menüpunkt können Sie die generierten Referrals eines Mitgliedes auflisten.', 7); addAdminMenuSql('user', 'list_links', 'Unbestätigte Mails', 'Mit diesem Menüpunkt können Sie die vom Mitglied nicht bestätigten Mails anzeigen.', 8); addAdminMenuSql('user', 'list_cats', 'Kategorien anzeigen', 'Listet die ausgewählten Kategorien eines Mitgliedes auf.', 9); break; case 'remove': // Do stuff when removing extension // SQL commands to run addDropTableSql('user_del'); addDropTableSql('user_cats'); addDropTableSql('user_data'); addDropTableSql('user_points'); addDropTableSql('user_links'); addDropTableSql('user_refs'); addDropTableSql('user_stats'); addDropTableSql('user_stats_data'); addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') OR `action`='user'"); // Register new filters for gathering points unregisterFilter(__FUNCTION__, __LINE__, 'get_total_points', 'USER_POINTS', true, isExtensionDryRun()); unregisterFilter(__FUNCTION__, __LINE__, 'get_own_points', 'USER_POINTS', true, isExtensionDryRun()); break; case 'activate': // Do stuff when admin activates this extension // SQL commands to run addExtensionSql(''); break; case 'deactivate': // Do stuff when admin deactivates this extension // SQL commands to run addExtensionSql(''); break; 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 ext-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 Sie sind hier im Menüpunkt Online-Liste 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. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {?mt_word?} haben sollen!"); 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 Patch 340 ü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 generateUserProfileLink() 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 {?mt_word?}, {?mt_word2?} und {?mt_word3?} 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 empty() 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 md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 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 ext-nickname auf) und Darstellungsfehler von 0.00000 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 task!)"); 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 Referral-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 NULL DEFAULT NULL"); 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', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `email` VARCHAR(255) NOT NULL DEFAULT '', `surname` VARCHAR(255) NOT NULL DEFAULT '', `family` VARCHAR(255) NOT NULL DEFAULT '', `joined` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `last_online` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `del_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, `del_reason` TINYTEXT, PRIMARY KEY (`id`), INDEX (`userid`)", 'List of deleted users'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); break; case '0.3.6': // SQL queries for v0.3.6 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` DROP INDEX `userid`'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` ADD UNIQUE INDEX `userid_catid` (`userid`,`cat_id`)'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); break; case '0.3.7': // SQL queries for v0.3.7 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `id` `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_cats` CHANGE `cat_id` `cat_id` TINYINT(3) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_del` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `stats_id` `stats_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_points` CHANGE `ref_depth` `ref_depth` TINYINT(3) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `cat_id` `cat_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `payment_id` `payment_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats` CHANGE `pool_id` `pool_id` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_stats_data` CHANGE `userid` `userid` BIGINT(20) UNSIGNED NULL DEFAULT NULL'); // Cleanup SQLs addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `userid` IS NULL OR `cat_id` IS NULL'); addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_del` WHERE `userid` IS NULL'); addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_links` SET `stats_id`=NULL WHERE `stats_id`=0'); addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_links` WHERE `userid` IS NULL'); addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_points` SET `ref_depth`=NULL WHERE `ref_depth`=0'); addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_points` WHERE `userid` IS NULL'); addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `cat_id`=NULL WHERE `cat_id`=0'); addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `payment_id`=NULL WHERE `payment_id`=0'); addExtensionSql('UPDATE `{?_MYSQL_PREFIX?}_user_stats` SET `pool_id`=NULL WHERE `pool_id`=0'); addExtensionSql('DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_user_stats` WHERE `userid` IS NULL'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("NULL ist wichtiger als 0 und UNSIGNED auch."); break; case '0.3.8': // SQL queries for v0.3.8 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `last_failure` `last_failure` TIMESTAMP NULL DEFAULT NULL'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Ausgangswert ist nicht mehr 0000-00-00 00:00:00, sondern einfach NULL."); break; case '0.3.9': // SQL queries for v0.3.9 // Update notes (these will be set as task text!) setExtensionUpdateNotes("Update verschoben nach ext-order (da es Werbeguthaben ist und nichts mit dem Mitglied selbst zu tun hat)."); break; case '0.4.0': // SQL queries for v0.4.0 // Register new filters for gathering points registerFilter('get_total_points', 'USER_POINTS', false, true, isExtensionDryRun()); registerFilter('get_own_points', 'USER_POINTS', false, true, isExtensionDryRun()); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Filter registriert, die das eigene {?POINTS?}-Guthaben des Mitgliedes zurückliefern."); break; case '0.4.1': // SQL queries for v0.4.1 // Add special fix include to fix filters addIncludeToPool('extension', 'inc/fix_user_points.php'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Das Mitgliederguthaben musste repariert werden, da für Referral-Ebene 0, noch NULL geschrieben wurde."); break; case '0.4.2': // SQL queries for v0.4.2 // Add special fix include to fix filters addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='chk_regs' LIMIT 1"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Überflüssiges Menü chk_regs entfernt, dies kann mit list_user übernommen werden."); break; case '0.4.3': // SQL queries for v0.4.3 // Add special fix include to fix filters addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `refid` `refid` BIGINT(20) NULL DEFAULT NULL"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Überflüssiges Menü chk_regs entfernt, dies kann mit list_user übernommen werden."); break; case '0.4.4': // SQL queries for v0.4.4 addDropTableSql('user_refs'); addCreateTableSql('user_refs', " `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `userid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, `level` smallINT(6) UNSIGNED NOT NULL DEFAULT 0, `refid` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0, PRIMARY KEY (`id`), UNIQUE INDEX `user_refid` (`userid`,`level`,`refid`), INDEX (`level`), INDEX (`refid`)", 'User referrals'); // Load ext-refback's special include to regenerate the referral table addIncludeToPool('extension', 'inc/fix_refsystem.php'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Neues Tabellenlayout und verschoben von ext-refback."); break; case '0.4.5': // SQL queries for v0.4.5 addExtensionSql("ALTER TABLE `{?_MYSQL_PREFIX?}_user_links` CHANGE `link_type` `link_type` VARCHAR(255) NOT NULL DEFAULT 'NORMAL'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Die Spalte link_type ist nun kein ENUM mehr, um weitere Mailtypen zu erlauben."); break; case '0.4.6': // SQL queries for v0.4.6 addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} gutschreiben' WHERE `what` = 'add_points' LIMIT 1"); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_admin_menu` SET `title`='{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen' WHERE `what` = 'sub_points' LIMIT 1"); addAdminMenuSql('user','sub_points','{OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen','Allen oder einem Mitglied {OPEN_CONFIG}POINTS{CLOSE_CONFIG} abziehen.', 8); // This update depends on ext-menu update addExtensionDependency('menu'); // Update notes (these will be set as task text!) setExtensionUpdateNotes("Abzug von {?POINTS?} sollte nun dabei sein und Hinzufügen gefixt (war zu kurze Spalte)."); break; case '0.4.7': // SQL queries for v0.4.7 addExtensionSql('ALTER TABLE `{?_MYSQL_PREFIX?}_user_data` CHANGE `lock_timestamp` `lock_timestamp` TIMESTAMP NULL DEFAULT NULL'); addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `lock_timestamp`=NULL WHERE `lock_timestamp`='0000-00-00 00:00:00'"); // Update notes (these will be set as task text!) setExtensionUpdateNotes("0000-00-00 00:00:00 ist kein Standardwert mehr, NULL ist dies."); break; } // END - switch break; case 'modify': // When the extension got modified break; case 'test': // For testing purposes break; case 'init': // Do stuff when extension is initialized break; default: // Unknown extension mode logDebugMessage(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName())); break; } // END - switch // [EOF] ?>