X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-user.php;h=64a17c749f8df727036448ff20142a2585ec99a6;hb=180e58a2c8ac96a0fe9bdf30fd5f38857bdc5f33;hp=54cfda5d11f09d9e7ec86986a0abaf175ee18ef6;hpb=60494e212a67fe360bfbb481eb4928480a6f379b;p=mailer.git diff --git a/inc/extensions/ext-user.php b/inc/extensions/ext-user.php index 54cfda5d11..64a17c749f 100644 --- a/inc/extensions/ext-user.php +++ b/inc/extensions/ext-user.php @@ -32,8 +32,7 @@ ************************************************************************/ // Some security stuff... -if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) -{ +if (!defined('__SECURITY')) { $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; require($INC); } @@ -46,12 +45,12 @@ $EXT_VER_HISTORY = array("0.0", "0.1", "0.1.1", "0.1.2", "0.1.2", "0.1.3", "0.1. switch ($EXT_LOAD_MODE) { -case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called) +case "register": // Do stuff when installation is running (modules.php?module=admin&action=login is called) // SQL commands to run $SQLs[] = ""; // Load CSS-File? - $EXT_CSS = 'Y'; + $EXT_CSS = "Y"; break; case "remove": // Do stuff when removing extension @@ -73,7 +72,7 @@ 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) NOT NULL DEFAULT '20'"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun möglich."; @@ -89,7 +88,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) 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."; @@ -101,7 +100,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) 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!"; @@ -124,7 +123,7 @@ case "update": // Update an extension case "0.1.8": // SQL queries for v0.1.8 // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; + $UPDATE_NOTES = "Seit Patch 340 überflüssige HTML-Tags entfernt."; break; case "0.1.9": // SQL queries for v0.1.9 @@ -138,15 +137,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(4) 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 sex sex 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."; @@ -183,7 +182,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."; @@ -195,7 +194,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='' 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"; @@ -214,17 +213,14 @@ case "update": // Update an extension break; default: // Do stuff when extension is loaded - $DUMMY = LOAD_CONFIG("0"); - $_CONFIG['user_limit'] = $DUMMY['user_limit']; - $_CONFIG['user_alpha'] = $DUMMY['user_alpha']; - unset($DUMMY); break; } + // Language file prefix $EXT_LANG_PREFIX = "user"; -// Extension is always active? -$EXT_ALWAYS_ACTIVE = 'Y'; +// Keep this extension always active! +$EXT_ALWAYS_ACTIVE = "Y"; // ?>