X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-user.php;h=3ba1a8a8ce9d189ed6800f265574a6f709d5e5e8;hb=b0cde844dd14cfd237a2a690129f1e5aa9470c0a;hp=9d3c4655b7463b4f934edf992fb4b5694a99b789;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 9d3c4655b7..3ba1a8a8ce 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -38,10 +38,10 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.3.3"; +$EXT_VERSION = "0.3.5"; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "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"); +$EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "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"); switch ($EXT_LOAD_MODE) { @@ -55,7 +55,8 @@ case "register": // Do stuff when installation is running (modules.php?module=ad case "remove": // Do stuff when removing extension // SQL commands to run - $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='config_user' OR what='user_contct' LIMIT 2"; + $SQLs[] = "DELETE LOW_PRIORITY FROM `"._MYSQL_PREFIX."_admin_menu` WHERE `what` IN('config_user','user_contct','list_user_del') LIMIT 3"; + $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_del`"; break; case "activate": // Do stuff when admin activates this extension @@ -72,14 +73,14 @@ case "update": // Update an extension switch ($EXT_VER) { case "0.1": // SQL queries for v0.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_limit INT(7) NOT NULL DEFAULT '20'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_limit` INT(7) UNSIGNED NOT NULL DEFAULT 20"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun möglich."; break; case "0.1.1": // SQL queries for v0.1.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_extensions SET ext_has_css='Y' WHERE ext_name='user' AND ext_has_css='N' LIMIT 1"; + $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_extensions` SET `ext_has_css`='Y' WHERE `ext_name`='user' AND `ext_has_css`='N' LIMIT 1"; // This update depends on sql_patches update! $EXT_UPDATE_DEPENDS = "sql_patches"; @@ -88,7 +89,7 @@ case "update": // Update an extension $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden."; case "0.1.2": // SQL queries for v0.1.2 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mails_confirmed BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "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!) $UPDATE_NOTES = "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."; @@ -100,7 +101,7 @@ case "update": // Update an extension break; case "0.1.4": // SQL queries for v0.1.4 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD emails_received BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'"; + $SQLs[] = "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!) $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!"; @@ -137,15 +138,15 @@ case "update": // Update an extension break; case "0.2.1": // SQL queries for v0.2.1 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD user_alpha TINYINT(3) UNSIGNED NOT NULL DEFAULT '10'"; - $SQLs[] = "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)"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_alpha` TINYINT(3) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "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!) $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 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data CHANGE gender gender ENUM('M','F','C') NOT NULL DEFAULT 'M'"; + $SQLs[] = "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!) $UPDATE_NOTES = "Anrede "Firma" hinzugefügt."; @@ -182,7 +183,7 @@ case "update": // Update an extension break; case "0.2.9": // SQL queries for v0.2.9 - $SQLs[] = "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)"; + $SQLs[] = "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!) $UPDATE_NOTES = "Admin-Kontaktformular hinzugefügt."; @@ -194,7 +195,7 @@ case "update": // Update an extension break; case "0.3.1": // SQL queries for v0.3.1 - $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET title = 'Mitglieder-Management' WHERE action = 'user' AND (what='' OR what IS NULL) LIMIT 1"; + $SQLs[] = "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!) $UPDATE_NOTES = "Verwaltung auf Management umgestellt"; @@ -209,18 +210,51 @@ case "update": // Update an extension // Update notes (these will be set as task text!) $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!)"; break; + + case "0.3.4": // SQL queries for v0.3.4 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `select_user_zero_refid` ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_min_confirmed` SMALLINT(5) UNSIGNED NOT NULL DEFAULT 10"; + $SQLs[] = "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!) + $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 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_reason` TINYTEXT"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD `lock_timestamp` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00'"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `user_delete_purge` BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day') * 30).""; + $SQLs[] = "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)"; + $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_del`"; + $SQLs[] = "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=MyISAM COMMENT='List of deleted users'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Der Sperrgrund wird nun mit abgespeichert und beim Löschen des Users mit ausgesendet."; + break; } 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; } -// Language file prefix -$EXT_LANG_PREFIX = "user"; - -// Extension is always active? +// Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; -// +// [EOF] ?>