X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-user.php;h=4dcc4c25ae431a68db452fdcd1033b54ad807e39;hp=7cc575b5661617de7ff7368069003145969bb20f;hb=15e0995f7a4a4b2c9b1b1a9273f785cf13605829;hpb=e3701377bd1dcae6ac39265f8c1bdd8d0fed7911 diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 7cc575b566..4dcc4c25ae 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -1,7 +1,7 @@ Sie sind hier im Menüpunkt Online-Liste erweitert."); - break; - - case "0.1.4": // SQL queries for v0.1.4 - ADD_SQL("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!) - EXT_SET_UPDATE_NOTES("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!) - 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("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!) - EXT_SET_UPDATE_NOTES("Seit Patch 340 überflüssige HTML-Tags entfernt."); - break; +// Version history array (add more with , '0.0.1' and so on) +setExtensionVersionHistory(array('0.0.0', '0.1.0', '0.1.1', '0.1.2', '0.1.3', '0.1.4', '0.1.5', '0.1.6', '0.1.7', '0.1.8', '0.1.9', '0.2.0', '0.2.1', '0.2.2', '0.2.3', '0.2.4', '0.2.5', '0.2.6', '0.2.7', '0.2.8', '0.2.9', '0.3.0', '0.3.1', '0.3.2', '0.3.3', '0.3.4', '0.3.5', '0.3.6', '0.3.7', '0.3.8', '0.3.9', '0.4.0', '0.4.1', '0.4.2', '0.4.3', '0.4.4', '0.4.5', '0.4.6', '0.4.7', '0.4.8', '0.4.9', '0.5.0', '0.5.1', '0.5.2', '0.5.3', '0.5.4', '0.5.5', '0.5.6', '0.5.7', '0.5.8', '0.5.9', '0.6.0', '0.6.1')); - case "0.1.9": // SQL queries for v0.1.9 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Link zum Mitgliedsprofil in Funktion ADMIN_USER_PROFILE_LINK() ausgelagert."); - break; - - case "0.2.0": // SQL queries for v0.2.0 - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("User-Liste ausgelagert in Templates und überbreite Zeile in 2er-Zeile umgewandelt."); - break; - - case "0.2.1": // SQL queries for v0.2.1 - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"); - ADD_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_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 Mailtausch, Mailtausches und Mailtauscher sind austauschbar."); - break; +// Keep this extension always active! +setExtensionAlwaysActive('Y'); - 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."); +switch (getExtensionMode()) { + case 'setup': // Do stuff when installation is running + // This has been moved to inc/extensions/user/mode-setup.php 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."); + case 'remove': // Do stuff when removing extension + // This has been moved to inc/extensions/user/mode-remove.php 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 'activate': // Do stuff when admin activates this extension + // Is the required PHP extension 'recode' loaded? + if (!extension_loaded('recode')) { + // Required extension not loaded + enableExtensionReportingFailure(); + } // END - if - 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 empty() umgestellt."); + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='subids' LIMIT 1"); break; - case "0.2.9": // SQL queries for v0.2.9 - ADD_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."); + case 'deactivate': // Do stuff when admin deactivates this extension + // SQL commands to run + addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='N',`locked`='Y' WHERE `what`='subids' LIMIT 1"); 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 md5() auf bessere Funktion generateHash() umgestellt.
Diverse Fixes für 0.2.1-Beta1 Release."); + case 'update': // Update an extension + // This has been moved to inc/extensions/user/mode-update.php break; - case "0.3.1": // SQL queries for v0.3.1 - ADD_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"); + case 'modify': // When the extension got modified 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 0.00000 unbestätigten Mails gefixt."); + case 'test': // For testing purposes 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 task!)"); + case 'init': // Do stuff when extension is initialized break; - case "0.3.4": // SQL queries for v0.3.4 - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"); - ADD_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."); + default: // Unknown extension mode + reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName())); break; - - case "0.3.5": // SQL queries for v0.3.5 - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_reason` TINYTEXT"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"); - ADD_SQL("ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""); - ADD_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_SQL("DROP TABLE IF EXISTS `{!_MYSQL_PREFIX!}_user_del`"); - ADD_SQL("CREATE TABLE `{!_MYSQL_PREFIX!}_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, -INDEX (`userid`), -PRIMARY KEY(`id`) -) TYPE={!_TABLE_TYPE!} COMMENT='List of deleted users'"); - - // Update notes (these will be set as task text!) - EXT_SET_UPDATE_NOTES("Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."); - break; - } - break; - -case "modify": // When the extension got modified - break; - -case "test": // For testing purposes. For details see file inc/modules/admin/what-extensions.php, arround line 305. - break; - -default: // Do stuff when extension is loaded - break; -} - -// Keep this extension always active! -EXT_SET_ALWAYS_ACTIVE("Y"); +} // END - switch // [EOF] ?>