X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fextensions%2Fext-sql_patches.php;h=99e1111bd822e4c47a983c8e1fe6c7667c5b5bb2;hp=f869145137e73f37af8d49ef346b5aaba6c3e094;hb=3608f72d51e8126720024704398cf738e61f890b;hpb=ae64f8d8d403a8e4990f484d14aad36722e1da51 diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index f869145137..99e1111bd8 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -38,13 +38,13 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.5.9"; +$EXT_VERSION = "0.6.1"; // Auto-set extension version if (!isset($EXT_VER)) $EXT_VER = $EXT_VERSION; // Version history array (add more with , "0.1" and so on) -$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "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"); +$EXT_VER_HISTORY = array("0.0", "0.0.1", "0.0.2", "0.0.3", "0.0.4", "0.0.5", "0.0.6", "0.0.7", "0.0.8", "0.0.9", "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"); switch ($EXT_LOAD_MODE) { @@ -149,7 +149,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*14).""; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "In der Tabelle "._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"; + $UPDATE_NOTES = "In der Tabelle "._MYSQL_PREFIX."_config musste die Spalte auto_purge (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf TINYINT(4) gesetzt.)"; break; case "0.0.3": // SQL queries for v0.0.3 @@ -163,7 +163,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mails_page BIGINT(20) UNSIGNED NOT NULL DEFAULT 10"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; + $UPDATE_NOTES = "Anzahl Mails pro Seite in EMail-Details ansehen und EMail-Archiv hinzugefügt."; break; case "0.0.5": // SQL queries for v0.0.5 @@ -189,10 +189,10 @@ case "update": // Update an extension break; case "0.0.8": // SQL queries for v0.0.8 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' · '"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD menu_blur_spacer VARCHAR(255) NOT NULL DEFAULT ' · '"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"; + $UPDATE_NOTES = "Nette Mouse-Hover-Effekte eingebaut (Anleitung MENUE_HOVER.txt zum Patchen der general.css bitte lesen!)"; break; case "0.0.9": // SQL queries for v0.0.9 @@ -215,7 +215,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365).""; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; + $UPDATE_NOTES = "Sie können nun hier die Verzögerungszeit in der Eingangsseite einstellen."; break; case "0.1.2": // SQL queries for v0.1.2 @@ -242,7 +242,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP ext_has_admin"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; + $UPDATE_NOTES = "Spalte ext_has_admin aus der Tabelle "._MYSQL_PREFIX."_extensions entfernt, da sie keinen Sinn mehr macht."; break; case "0.1.6": // SQL queries for v0.1.6 @@ -255,7 +255,7 @@ case "update": // Update an extension $SQLs[] = "INSERT INTO `"._MYSQL_PREFIX."_admin_menu` (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_title','Seitentitel ändern','De-/aktivieren Sie hier die Dekorationen, sowie Modul-Titel und what-Titel im Seitentitel.', 8)"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; + $UPDATE_NOTES = "Dekorationen des Seitentiteles lassen sich ein- und ausschalten und selber definieren; Modul-Titel und Titel der what-Dateien kann hinzugefügt werden."; break; case "0.1.7": // SQL queries for v0.1.7 @@ -317,7 +317,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD img_type ENUM('jpg','png') NOT NULL DEFAULT '".$auto_type."'"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; + $UPDATE_NOTES = "Generierung des Mailbestätigungscodes hängt davon ab, ob die PHP-Funktion imagecreatefromjpeg() und das JPEG-Bild vorhanden sind oder nicht."; break; case "0.2.5": // SQL queries for v0.2.5 @@ -325,7 +325,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` CHANGE max_mails max_mails BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."; + $UPDATE_NOTES = "Spalten max_mails und receive_mails auf BIGINT(20) gesetzt."; break; case "0.2.6": // SQL queries for v0.2.6 @@ -340,10 +340,10 @@ case "update": // Update an extension $SQLs[] = "UPDATE `"._MYSQL_PREFIX."_admin_menu` SET `what`='config_stats' WHERE `what`='stats' LIMIT 1"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "
    -
  1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
  2. -
  3. Mitgliederstatistik mit Seitennavigation.
  4. -
"; + $UPDATE_NOTES = "
    +
  1. Das Mitglied kann das derzeitige Design in sein Profil abspeichern.
  2. +
  3. Mitgliederstatistik mit Seitennavigation.
  4. +
"; break; case "0.2.8": // SQL queries for v0.2.8 @@ -359,7 +359,7 @@ case "update": // Update an extension $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD mt_word3 VARCHAR(255) NOT NULL DEFAULT 'Mailtauscher'"; // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; + $UPDATE_NOTES = "Wörter Mailtausch, Mailtausches und Mailtauscher sind austauschbar."; break; case "0.3.0": // SQL queries for v0.3.0 @@ -587,11 +587,8 @@ PRIMARY KEY (id) break; case "0.4.7": // SQL queries for v0.4.7 - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failtures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; - $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failture TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; - // Update notes (these will be set as task text!) - $UPDATE_NOTES = "Fehlgeschlagene Login-Versuche werden nun mitgezählt und der letzte vermerkt."; + $UPDATE_NOTES = "Veraltetes Update."; break; case "0.4.8": // SQL queries for v0.4.8 @@ -702,6 +699,24 @@ PRIMARY KEY (`filter_id`) // Update notes (these will be set as task text!) $UPDATE_NOTES = "Tabellen für Filter-System hinzugefügt."; break; + + case "0.6.0": // SQL queries for v0.6.0 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_filters` ADD `filter_counter` BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_config` ADD `update_filter_usage` ENUM('N','Y') NOT NULL DEFAULT 'N'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Benutzungsstatistik eingebaut. Das Zählen der Filterverwendungen sollte ausschliesslich zu Debugging-Zwecken eingesetzt werden."; + break; + + case "0.6.1": // SQL queries for v0.6.1 + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP login_failtures"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` DROP last_failture"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD login_failures BIGINT(20) UNSIGNED NOT NULL DEFAULT 0"; + $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_user_data` ADD last_failure TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Falsche Schreibweise korregiert."; + break; } break; @@ -738,7 +753,7 @@ default: // Do stuff when extension is loaded $hashFile = sprintf("%sinc/.secret/.%s", PATH, getConfig('file_hash')); if (FILE_READABLE($hashFile)) { // Read file - $_CONFIG['secret_key'] = implode("", file($hashFile)); + $_CONFIG['secret_key'] = READ_FILE($hashFile); } else { // Remove it from database UPDATE_CONFIG("file_hash", "");