]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-user.php
Updated domain without a dash :(
[mailer.git] / inc / extensions / ext-user.php
index d62590ede9c0fa942366da8b57b29a8797c0c38c..4dcc4c25ae431a68db452fdcd1033b54ad807e39 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 04/29/2004 *
- * ================                             Last change: 10/29/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 04/29/2004 *
+ * ===================                          Last change: 10/29/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : ext-user.php                                     *
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Ausgelagertes Mitglieder-Management              *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision::                                                        $ *
+ * $Date::                                                            $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
- * Copyright (c) 2003 - 2008 by Roland Haeder                           *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
 
 // Some security stuff...
 if (!defined('__SECURITY')) {
-       $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
-       require($INC);
-}
+       die();
+} // END - if
 
 // Version number
-$EXT_VERSION = "0.3.3";
-
-// 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");
-
-switch ($EXT_LOAD_MODE)
-{
-case "register": // Do stuff when installtion is running (modules.php?module=admin&action=login is called)
-       // SQL commands to run
-       $SQLs[] = "";
-
-       // Load CSS-File?
-       $EXT_CSS = "Y";
-       break;
-
-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";
-       break;
-
-case "activate": // Do stuff when admin activates this extension
-       // SQL commands to run
-       $SQLs[] = "";
-       break;
-
-case "deactivate": // Do stuff when admin deactivates this extension
-       // SQL commands to run
-       $SQLs[] = "";
-       break;
-
-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'";
-
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Seitenweises Anzeigen der User-Liste ist nun m&ouml;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";
-
-               // This update depends on sql_patches update!
-               $EXT_UPDATE_DEPENDS = "sql_patches";
+setThisExtensionVersion('0.6.1');
 
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "CSS-Datei kann per Admin-Bereich ein- und ausgeschaltet werden.";
+// 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.2": // SQL queries for v0.1.2
-               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD mails_confirmed BIGINT(20) UNSIGNED NOT NULL DEFAULT '0'";
+// Keep this extension always active!
+setExtensionAlwaysActive('Y');
 
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Dem Mitglied wird nun angezeigt, wie viele Mails er best&auml;tigt hat. Alle vor dieser Version best. Mails werden leider nicht mehr ber&uuml;cksichtigt! Bitte teilen Sie dies Ihren Mitgliedern mit.";
+switch (getExtensionMode()) {
+       case 'setup': // Do stuff when installation is running
+               // This has been moved to inc/extensions/user/mode-setup.php
                break;
 
-       case "0.1.3": // SQL queries for v0.1.3
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Den Pfad <I>Sie sind hier</I> im Men&uuml;punkt <U>Online-Liste</U> erweitert.";
+       case 'remove': // Do stuff when removing extension
+               // This has been moved to inc/extensions/user/mode-remove.php
                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'";
+       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
 
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Anzahl empfangener Mails wird angezeigt. <BIG>Diese Anzeige kann fehlerhaft sein, wenn Sie bereits Mitglieder in Ihrem {!MT_WORD!} haben sollen!</BIG>";
+               // SQL commands to run
+               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `visible`='Y',`locked`='N' WHERE `what`='subids' LIMIT 1");
                break;
 
-       case "0.1.5": // SQL queries for v0.1.5
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
+       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.1.6": // SQL queries for v0.1.6
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Fehler beseitigt, wenn error_reporting=E_ALL gesetzt ist.";
+       case 'update': // Update an extension
+               // This has been moved to inc/extensions/user/mode-update.php
                break;
 
-       case "0.1.7": // SQL queries for v0.1.7
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Erweiterung bleibt wegen integrierten Schalters immer aktiv.";
+       case 'modify': // When the extension got modified
                break;
 
-       case "0.1.8": // SQL queries for v0.1.8
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Seit <A href=\"#\">Patch 340</A> &uuml;berfl&uuml;ssige HTML-Tags entfernt.";
+       case 'test': // For testing purposes
                break;
 
-       case "0.1.9": // SQL queries for v0.1.9
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Link zum Mitgliedsprofil in Funktion <U>ADMIN_USER_PROFILE_LINK()</U> ausgelagert.";
+       case 'init': // Do stuff when extension is initialized
                break;
 
-       case "0.2.0": // SQL queries for v0.2.0
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "User-Liste ausgelagert in Templates und &uuml;berbreite Zeile in 2er-Zeile umgewandelt.";
+       default: // Unknown extension mode
+               reportBug(__FILE__, __LINE__, sprintf('Unknown extension mode %s in extension %s detected.', getExtensionMode(), getCurrentExtensionName()));
                break;
+} // END - switch
 
-       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)";
-
-               // 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'";
-
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Anrede &quot;Firma&quot; hinzugef&uuml;gt.";
-               break;
-
-       case "0.2.3": // SQL queries for v0.2.3
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Datumsformat festgelegt auf ausf&uuml;hrlich.";
-               break;
-
-       case "0.2.4": // SQL queries for v0.2.4
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "W&ouml;rter <STRONG>Mailtausch</STRONG>, <STRONG>Mailtausches</STRONG> und <STRONG>Mailtauscher</STRONG> sind austauschbar.";
-               break;
-
-       case "0.2.5": // SQL queries for v0.2.5
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "SQL-Anweisungen abgesichert.";
-               break;
-
-       case "0.2.6": // SQL queries for v0.2.6
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Abspeichern von Einstellungen repariert.";
-               break;
-
-       case "0.2.7": // SQL queries for v0.2.7
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Sicherheitsupdate f&uuml;r die Include-Befehle.";
-               break;
-
-       case "0.2.8": // SQL queries for v0.2.8
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "if-Anweisungen auf Funktion <STRONG>empty()</STRONG> umgestellt.";
-               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 &uuml;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&uuml;gt.";
-               break;
-
-       case "0.3.0": // SQL queries for v0.3.0
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Hash-Erstellung von <STRONG>md5()</STRONG> auf bessere Funktion <STRONG>generateHash()</STRONG> umgestellt.<br />Diverse Fixes f&uuml;r <em>0.2.1-Beta1</em> Release.";
-               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";
-
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "Verwaltung auf Management umgestellt";
-               break;
-
-       case "0.3.2": // SQL queries for v0.3.2
-               // Update notes (these will be set as task text!)
-               $UPDATE_NOTES = "PHP-Hinweis in Userauflistung gefixt (trat bei fehlender nickname-Erweiterung auf) und Darstellungsfehler von <strong>0.00000</strong> unbest&auml;tigten Mails gefixt.";
-               break;
-
-       case "0.3.3": // SQL queries for v0.3.3
-               // 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&auml;tigte Mitglieder-Accounts sind seperat oder gemeinsam auflistbar (seperat nur mit der Erweiterung <em>task</em>!)";
-               break;
-       }
-       break;
-
-default: // Do stuff when extension is loaded
-       break;
-}
-
-// Language file prefix
-$EXT_LANG_PREFIX = "user";
-
-// Extension is always active?
-$EXT_ALWAYS_ACTIVE = "Y";
-
-//
+// [EOF]
 ?>