]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/sql_patches/mode-update.php
Continued, finally:
[mailer.git] / inc / extensions / sql_patches / mode-update.php
index ca9b7a9e61dbe7450f847a70eadd70e4f393c379..d5562501e80ad07479b36f09c6447988b1e95ddf 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Schritte fuer Updates von ext-sql_patches        *
  * -------------------------------------------------------------------- *
- * $Revision::                                                        $ *
- * $Date::                                                            $ *
- * $Tag:: 0.2.1-FINAL                                                 $ *
- * $Author::                                                          $ *
- * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2012 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 *
@@ -40,7 +35,7 @@ if (!defined('__SECURITY')) {
        die();
 } // END - if
 
-// @TODO Remove double-tabs
+// @TODO Remove double tabs from all lines
                switch (getCurrentExtensionVersion()) {
                        case '0.0.1': // SQL queries for v0.0.1
                                addAdminMenuSql('setup', 'config_extensions', 'Erweitungsmanagement', 'Alle Einstellungen am Erweiterungsmanagement.', 10);
@@ -50,14 +45,12 @@ if (!defined('__SECURITY')) {
                                break;
 
                        case '0.0.2': // SQL queries for v0.0.2
-                               addConfigChangeSql('auto_purge', 'auto_purge', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay()*14));
-
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("In der Tabelle <strong>{?_MYSQL_PREFIX?}_config</strong> musste die Spalte <strong>auto_purge</strong> (autom. L&ouml;schen von Best&auml;tigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)");
+                               setExtensionUpdateNotes("Nicht mehr verwendetes Update, da nach <strong>ext-autopurge</strong> verschoben.");
                                break;
 
                        case '0.0.3': // SQL queries for v0.0.3
-                               addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT '{OPEN_TEMPLATE}DEFAULT_POINTS{CLOSE_TEMPLATE}'");
+                               addConfigAddSql('points_word', "VARCHAR(255) NOT NULL DEFAULT '{OPEN_LANGUAGE}DEFAULT_POINTS{CLOSE_LANGUAGE}'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Das Wort &quot;Punkte&quot; kann nun per Datenbank ge&auml;ndert werden. Damit k&ouml;nnen anstelle des Wortes Punkte auch Klammlose, Wernis, Primera und auch &euro; geschrieben werden.");
@@ -186,7 +179,7 @@ if (!defined('__SECURITY')) {
                                break;
 
                        case '0.2.1': // SQL queries for v0.2.1
-                               addConfigAddSql('css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
+                               addConfigAddSql('css_php', "ENUM('DIRECT','FILE','INLINE','ASSET') NOT NULL DEFAULT 'FILE'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
@@ -445,8 +438,9 @@ INDEX (`admin_id`)",
                                break;
 
                        case '0.4.5': // SQL queries for v0.4.5
-                               addConfigAddSql('last_month', 'CHAR(2) NOT NULL DEFAULT 00');
-                               addConfigAddSql('last_week', 'CHAR(2) NOT NULL DEFAULT 00');
+                               addConfigAddSql('last_daily'  , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigAddSql('last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigAddSql('last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("T&auml;glichen/w&ouml;chentlichen/monatlichen Reset verbessert.");
@@ -504,10 +498,8 @@ INDEX (`admin_id`)",
                                break;
 
                        case '0.5.4': // SQL queries for v0.5.4
-                               addMemberMenuSql('main', 'reflist', 'Ref-&Uuml;bersicht', 5);
-
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Ref-&Uuml;bersicht eingebaut. Diese h&auml;ngt von der Erweiterung <strong>refback</strong> ab.");
+                               setExtensionUpdateNotes("Dieses Update wurde nach ext-refback verschoben.");
                                break;
 
                        case '0.5.5': // SQL queries for v0.5.5
@@ -580,7 +572,7 @@ UNIQUE INDEX `name_function` (`filter_name`, `filter_function`)",
                                setExtensionUpdateNotes("Filter-Tabelle bereinigt um doppelte Eintr&auml;ge und Unique-Key auf <span class=\"bad\">filter_name</span> und <span class=\"bad\">filter_function</span> zusammen gesetzt.");
 
                                // Add special fix include to fix filters
-                               addIncludeToPool('extension', 'inc/fix_filters.php');
+                               addIncludeToPool('extension', 'inc/fixes/fix_filters.php');
                                break;
 
                        case '0.6.4': // SQL queries for v0.6.4
@@ -595,7 +587,7 @@ UNIQUE INDEX `name_function` (`filter_name`, `filter_function`)",
                                break;
 
                        case '0.6.5': // SQL queries for v0.6.5
-                               addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE') NOT NULL DEFAULT 'FILE'");
+                               addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE','ASSET') NOT NULL DEFAULT 'FILE'");
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php oder sie sind direkt eingebunden.");
@@ -689,15 +681,15 @@ INDEX (`ip`)",
                                break;
 
                        case '0.7.5': // SQL queries for v0.7.5
-                               addConfigAddSql('last_hour', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigAddSql('last_hourly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Aktuelle Stunde hinzugef&uuml;gt (ist nicht konfigurierbar).");
                                break;
 
                        case '0.7.6': // SQL queries for v0.7.6
-                               addConfigChangeSql('last_month', 'last_month', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
-                               addConfigChangeSql('last_week', 'last_week', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigChangeSql('last_month', 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigChangeSql('last_week' , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Spaltentyp fuer kleine Zahlen sollten auch z.B. TINYINT sein.");
@@ -756,10 +748,6 @@ UNIQUE KEY (`subject`)",
                                addExtensionChangeTableColumnSql('points_data', 'ext_name', 'subject', "VARCHAR(255) NOT NULL DEFAULT ''");
                                addExtensionAddTableColumnSql('points_data', 'notify_recipient', "ENUM('Y','N') NOT NULL DEFAULT 'N'");
 
-                               // Register points data
-                               registerExtensionPointsData('pool_payback', 'points', 'LOCKED', 'DIRECT');
-                               registerExtensionPointsData('mail_deleted', 'points', 'LOCKED', 'DIRECT');
-
                                // Remove deprecated configuration entry
                                addConfigDropSql('reg_points_mode');
 
@@ -839,53 +827,17 @@ INDEX (`history_last_used` DESC)",
 
                                // Register points data
                                registerExtensionPointsData('admin_add_single', 'points', 'LOCKED', 'DIRECT');
-                               registerExtensionPointsData('admin_add_single_ref', 'points', 'LOCKED', 'DIRECT');
                                registerExtensionPointsData('admin_add_all', 'points', 'LOCKED', 'DIRECT');
-                               registerExtensionPointsData('admin_add_all_ref', 'points', 'LOCKED', 'DIRECT');
 
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Filter zum Initialisieren von ext-sql_patches registriert und Eintr&auml;ge in <strong>{?_MYSQL_PREFIX?}_points_data</strong> hinzugef&uuml;gt.");
                                break;
 
                        case '0.9.1': // SQL queries for v0.9.1
-                               // Add admin menu
-                               addAdminMenuSql('misc', 'list_server_name', 'Verkehrte Domains auflisten', 'Listet alle als verkehrt erkannten Domains auf.', 4);
-
-                               // Create table
-                               addCreateTableSql('server_name_log', "
-`server_name_id` BIGINT (20) NOT NULL AUTO_INCREMENT,
-`server_name` VARCHAR (255) NOT NULL DEFAULT 'invalid',
-`server_name_remote_addr` VARCHAR (15) NOT NULL DEFAULT '0.0.0.0',
-`server_name_ua` TINYTEXT NULL DEFAULT NULL,
-`server_name_referrer` TINYTEXT NULL DEFAULT NULL,
-`server_name_added` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
-`server_name_counter` BIGINT (20) NOT NULL DEFAULT 1,
-PRIMARY KEY (`server_name_id`)
-", 'Logging of wrong SERVER_NAME');
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Loggen von falschen <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
-                               break;
-
                        case '0.9.2': // SQL queries for v0.9.2
-                               addExtensionAddTableColumnSql('server_name_log', 'server_name_remote_addr', "VARCHAR (15) NOT NULL DEFAULT '0.0.0.0'");
-                               addExtensionAddTableColumnSql('server_name_log', 'server_name_counter', 'BIGINT (20) NOT NULL DEFAULT 0');
-                               addExtensionAddTableColumnSql('server_name_log', 'server_name_ua', 'TINYTEXT NULL DEFAULT NULL');
-                               addExtensionAddTableColumnSql('server_name_log', 'server_name_referrer', 'TINYTEXT NULL DEFAULT NULL');
-
-                               // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Sorry, hatte noch IP-Nummer, User-Agent, aufrufende Seite und Z&auml;hler vergessen.");
-                               break;
-
                        case '0.9.3': // SQL queries for v0.9.3
-                               addConfigAddSql('ap_server_name', "ENUM('Y','N') NOT NULL DEFAULT 'Y'");
-                               addConfigAddSql('ap_server_name_since', 'BIGINT(20) UNSIGNED NOT NULL DEFAULT ' . (getOneDay() * 7));
-
-                               // Register filter
-                               registerFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', FALSE, TRUE, isExtensionDryRun());
-
                                // Update notes (these will be set as task text!)
-                               setExtensionUpdateNotes("Bereinigung von verkehrten <strong>SERVER_NAME</strong> Eintr&auml;gen hinzugef&uuml;gt.");
+                               setExtensionUpdateNotes("Dieses Update wurde nach ext-server_name verschoben.");
                                break;
 
                        case '0.9.4': // SQL queries for v0.9.4
@@ -918,22 +870,76 @@ PRIMARY KEY (`server_name_id`)
                                // Update notes (these will be set as task text!)
                                setExtensionUpdateNotes("Filter hinzugef&uuml;gt, der die Standard-Referral-Id f&uuml;r SQL-Befehle ausschliesst.");
                                break;
-               } // END - switch
-               break;
 
-       case 'modify': // When the extension got modified
-               break;
+                       case '0.9.8': // SQL queries for v0.9.8
+                               addConfigChangeSql('last_hour'  , 'last_hourly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigChangeSql('last_update', 'last_daily'  , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigChangeSql('last_week'  , 'last_weekly' , 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
+                               addConfigChangeSql('last_month' , 'last_monthly', 'TINYINT(2) UNSIGNED ZEROFILL NOT NULL DEFAULT 00');
 
-       case 'test': // For testing purposes
-               break;
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Spalten umbenannt, damit die Namen (Verwendung) nun eindeutiger sind.");
+                               break;
+
+                       case '0.9.9': // SQL queries for v0.9.9
+                               addConfigAddSql('last_yearly', 'SMALLINT(4) UNSIGNED ZEROFILL NOT NULL DEFAULT ' . getYear());
+                               addConfigChangeSql('pass_len', 'min_password_length', 'TINYINT(2) UNSIGNED NOT NULL DEFAULT 5');
+                               addConfigAddSql('min_password_score', 'TINYINT(2) UNSIGNED NOT NULL DEFAULT 3');
+                               addModuleSql('api', '{OPEN_LANGUAGE}MODULE_GENERIC_API_TITLE{CLOSE_LANGUAGE}', 'Y', 'Y', 'N', 'N');
+
+                               // Make this depending on ext-mods
+                               addExtensionDependency('mods');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Jahres-Reset + generelles API-Modul hinzugef&uuml;gt.");
+                               break;
 
-       case 'init': // Do stuff when extension is initialized
-               break;
+                       case '1.0.0': // SQL queries for v1.0.0
+                               addExtensionSql("UPDATE `{?_MYSQL_PREFIX?}_member_menu` SET `action`='account' WHERE `what`='categories'");
 
-       default: // Unknown extension mode
-               reportBug(__FILE__, __LINE__, sprintf("Unknown extension mode %s in extension %s detected.", getExtensionMode(), getCurrentExtensionName()));
-               break;
-} // END - switch
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Auswahl im Mitgliedsbereich verschoben nach &quot;Ihr Account&quot;.");
+                               break;
+
+                       case '1.0.1': // SQL queries for v1.0.1
+                               addModuleSql('ajax', 'AJAX', 'N', 'Y', 'N', 'N');;
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("AJAX-Modul hinzugef&uuml;gt.");
+                               break;
+
+                       case '1.0.2': // SQL queries for v1.0.2
+                               // Register points data
+                               registerExtensionPointsData('pool_payback', 'points', 'LOCKED', 'DIRECT');
+                               registerExtensionPointsData('mail_deleted', 'points', 'LOCKED', 'DIRECT');
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("registerExtensionPointsData() klappt bei der ersten Installation nicht, da die Spalte <em>account_provider</em> fehlt.");
+                               break;
+
+                       case '1.0.3': // SQL queries for v1.0.3
+                               // Remove admin menu
+                               addExtensionSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admin_menu` WHERE `what`='list_server_name' LIMIT 1");
+
+                               // Unregister filter (moved to ext-server_name)
+                               unregisterFilter(__FILE__, __LINE__, 'extra_autopurge', 'SERVER_NAME_EXTRA_AUTOPURGE', TRUE, isExtensionDryRun());
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Dieses Feature wurde nach ext-server_name verschoben, damit dies klappt, muss zuvor der Filter manuell aus der Datenbank gel&ouml;scht werden, da sonst ein Auto-Unregister erfolgt, was auskommentiert ist. Dies gilt nur f&uuml;r bestehende Installationen, nicht neue.");
+                               break;
+
+                       case '1.0.4': // SQL queries for v1.0.4
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("jQuery aktualisiert.");
+                               break;
+
+                       case '1.0.5': // SQL queries for v1.0.5
+                               addConfigChangeSql('css_php', 'css_php', "ENUM('DIRECT','FILE','INLINE','ASSET') NOT NULL DEFAULT 'FILE'");
+
+                               // Update notes (these will be set as task text!)
+                               setExtensionUpdateNotes("Ausgabe der CSS-Dateien entweder per css.php, als style-Tag, als minifiziertes Asset &quot;kompiliert&quot; oder sie sind direkt eingebunden.");
+                               break;
+               } // END - switch
 
 // [EOF]
 ?>