X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fextensions%2Fext-sql_patches.php;h=9b0bed6a629db5beba17708600b1bf342e2a7117;hb=6fc12676fe7e6be6151ffed7bac2a2d6efd22086;hp=87300c92c2a8413ad32ef324424f654e89aa40e8;hpb=524c58a61b0a074fed8d7c9dc2f9ddab7f653595;p=mailer.git diff --git a/inc/extensions/ext-sql_patches.php b/inc/extensions/ext-sql_patches.php index 87300c92c2..9b0bed6a62 100644 --- a/inc/extensions/ext-sql_patches.php +++ b/inc/extensions/ext-sql_patches.php @@ -38,23 +38,30 @@ if (!defined('__SECURITY')) { } // Version number -$EXT_VERSION = "0.5.3"; +$EXT_VERSION = "0.5.6"; // 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"); +$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"); 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[] = ""; break; case "remove": // Do stuff when removing extension - // SQL commands to run + // Drop tables + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes"; + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; + $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; + $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`"; + + // Delete admin menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_admin_menu WHERE what='theme_import' OR what='theme_edit' OR @@ -69,12 +76,16 @@ what='config_proxy' OR what='config_session' OR what='list_norefs' LIMIT 14"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes"; + + // Delete guest menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_guest_menu WHERE action='themes' LIMIT 1"; + + // Delete/update member menu entries $SQLs[] = "DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_member_menu WHERE action='themes' OR what='themes' OR what='stats2' OR +what='reflist' OR (action='stats' AND (what='' OR what IS NULL)) OR (action='extras' AND (what='' OR what IS NULL)) OR (action='rals' AND (what='' OR what IS NULL)) OR @@ -84,9 +95,6 @@ action='stats' OR action='extras' OR action='rals' OR action='account'"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_las_data"; - $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_admin_menu_stats"; // Drop indexes $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP UNIQUE KEY (ext_name)"; @@ -656,12 +664,46 @@ PRIMARY KEY (id) break; case "0.5.3": // SQL queries for v0.5.3 - $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD session_save_path varchar(255) NOT NULL DEFAULT ''"; + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD session_save_path VARCHAR(255) NOT NULL DEFAULT ''"; $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('setup','config_session','Session-Einstellungen','Ändern Sie hier den Speicherpfad für Sessiondateien (Sitzungsdateien) ab, falls die Standart-Einstellung bei Ihrem Hoster zu Problem führen sollte.', 16)"; // Update notes (these will be set as task text!) $UPDATE_NOTES = "Session-Speicherpfad konfigurierbar. Beispielsweise ist dies bei all-inkl.com nötig."; break; + + case "0.5.4": // SQL queries for v0.5.4 + $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('main','reflist','Ref-Übersicht',5,'N','N')"; + + // Depends on refback extension + $EXT_UPDATE_DEPENDS = "refback"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Ref-Übersicht eingebaut. Diese hängt von der Erweiterung refback ab."; + break; + + case "0.5.5": // SQL queries for v0.5.5 + $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD show_points_unconfirmed ENUM('Y','N') NOT NULL DEFAULT 'Y'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Anzeige der {!POINTS!} unter den unbestätigten Mails kann nun optional abgeschaltet werden."; + break; + + case "0.5.6": // SQL queries for v0.5.6 + $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_stats_data`"; + $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_stats_data` ( +`id` BIGINT(20) NOT NULL AUTO_INCREMENT, +`userid` BIGINT(20) NOT NULL DEFAULT 0, +`stats_type` VARCHAR(255) NOT NULL DEFAULT 'unknown', +`stats_data` VARCHAR(255) NOT NULL DEFAULT '', +`inserted` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +PRIMARY KEY(`id`), +INDEX (`userid`), +INDEX (`stats_type`) +) TYPE=MyISAM COMMENT='Member statistics data'"; + + // Update notes (these will be set as task text!) + $UPDATE_NOTES = "Mitglieder könnnen nun z.B. in den Mail-Details zu jeder Mail sehen, wann sie diese bestätigt haben. Die neue Statistik-Tabelle ist aber universell einsetzbar."; + break; } break; @@ -708,7 +750,7 @@ default: // Do stuff when extension is loaded define('MT_WORD3', $_CONFIG['mt_word3']); define('_MAX' , $_CONFIG['rand_no']); } else { - // Set some lame ;-) default settings + // Set some lame ( ;-) ) default settings $_CONFIG['def_refid'] = 0; $_CONFIG['enable_title_deco'] = "N"; $_CONFIG['title_mod_show'] = "Y"; @@ -725,7 +767,7 @@ default: // Do stuff when extension is loaded // Language file prefix (hmmm, what shall I write with SQL fixes? ;-) ) $EXT_LANG_PREFIX = "sql_patches"; -// Extension is always active? +// Keep this extension always active! $EXT_ALWAYS_ACTIVE = "Y"; //