Moved "fix" files (which only helps to fix stuff) in own inc/fixes/ folder.
[mailer.git] / inc / extensions / user / mode-update.php
index a44e5dc..ee6a940 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Schritte fuer Updates fuer ext-user              *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2013 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -272,7 +267,7 @@ INDEX (`userid`)",
 
                        case '0.4.1': // SQL queries for v0.4.1
                                // Add special fix include to fix filters
-                               addIncludeToPool('extension', 'inc/fix_user_points.php');
+                               addIncludeToPool('extension', 'inc/fixes/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.");
@@ -308,7 +303,7 @@ INDEX (`refid`)",
                                        'User referrals');
 
                                // Load ext-refback's special include to regenerate the referral table
-                               addIncludeToPool('extension', 'inc/fix_refsystem.php');
+                               addIncludeToPool('extension', 'inc/fixes/fix_refsystem.php');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Neues Tabellenlayout und verschoben von ext-refback.");
@@ -405,6 +400,12 @@ INDEX (`refid`)",
                                break;
 
                        case '0.5.3': // SQL queries for v0.5.3
+                               // Is the PHP extension 'recode' activated
+                               if (!isPhpExtensionLoaded('recode')) {
+                                       // This update requires 'recode'
+                                       enableExtensionReportingFailure();
+                               } // END - if
+
                                // Register filter
                                registerFilter(__FILE__, __LINE__, 'post_refid_validation', 'HANDLE_USER_SUBID', FALSE, TRUE, isExtensionDryRun());
                                registerFilter(__FILE__, __LINE__, 'pre_user_registration', 'SUBID_USER_REGISTRATION_ADD_SQL_COLUMNS', FALSE, TRUE, isExtensionDryRun());
@@ -519,6 +520,51 @@ INDEX (`subid`)",
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Men&uuml;punkt umbenannt um Platz f&uuml;r Konflikt mit <strong>what-config_cats.php</strong> zu schaffen.");
                                break;
+
+                       case '0.6.1': // SQL queries for v0.6.1
+                               // Add table for user login provider
+                               addDropTableSql('user_login_provider');
+                               addCreateTableSql('user_login_provider', "
+`provider_id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
+`provider_name` VARCHAR(255) NOT NULL DEFAULT 'local_generic_user_login',
+`provider_extension` VARCHAR(255) NOT NULL DEFAULT 'user',
+`provider_is_active` ENUM('Y','N') NOT NULL DEFAULT 'N',
+PRIMARY KEY (`provider_id`)",
+                                       'User login providers');
+
+                               // Add (activated) default entry
+                               addExtensionSql("INSERT INTO `{?_MYSQL_PREFIX?}_user_login_provider` (`provider_is_active`) VALUES ('Y')");
+
+                               // Admin menu
+                               addAdminMenuSql('setup', 'list_user_login_provider', 'MLPs verwalten', 'Alle Mitgliederlogin-Provider (MLP) auflisten und verwalten.', 10);
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Tabelle f&uuml;r Mitgliedslogin-Provider hinzugef&uuml;gt.");
+                               break;
+
+                       case '0.6.2': // SQL queries for v0.6.2
+                               // Register a filter
+                               registerFilter(__FILE__, __LINE__, 'user_login', 'GENERIC_USER_LOGIN', FALSE, TRUE, isExtensionDryRun());
+                               registerFilter(__FILE__, __LINE__, 'check_user_login', 'GENERIC_USER_LOGIN_CHECK', FALSE, TRUE, isExtensionDryRun());
+
+                               // Add column for login provider
+                               addExtensionAddTableColumnSql('user_data', 'login_provider', "VARCHAR (255) NOT NULL DEFAULT 'user'");
+
+                               // Add config entry
+                               // @TODO Make configurable through web interface
+                               addConfigAddSql('default_login_provider', "VARCHAR(255) NOT NULL DEFAULT 'login'");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Filter f&uuml;r das Handling der Loginanfragen hinzuge&uuml;gt.");
+                               break;
+
+                       case '0.6.3': // SQL queries for v0.6.3
+                               addExtensionAddTableColumnSql('user_data', 'confirmed_timestamp', 'TIMESTAMP NULL DEFAULT NULL');
+                               addExtensionAddTableColumnSql('user_data', 'confirmed_ip_address', 'VARCHAR(255) NULL DEFAULT NULL');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Spalten f&uuml;r Best&auml;tigungszeitpunkt und IP-Adresse hinzugef&uuml;gt.");
+                               break;
                } // END - switch
 
 // [EOF]