]> git.mxchange.org Git - mailer.git/blobdiff - inc/extensions/ext-sql_patches.php
Refback extension in alpha phase finished, users can give refback to all refs in...
[mailer.git] / inc / extensions / ext-sql_patches.php
index 1cfd76056c9d036024c3ac569e9918ae19c9bd97..11c808fc3bac44cedae5759ad16f660631b47527 100644 (file)
@@ -38,13 +38,13 @@ if (!defined('__SECURITY')) {
 }
 
 // Version number
-$EXT_VERSION = "0.5.0";
+$EXT_VERSION = "0.5.2";
 
 // 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");
+$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");
 
 switch ($EXT_LOAD_MODE)
 {
@@ -76,7 +76,8 @@ what='stats2' 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
-(action='account' AND (what='' OR what IS NULL)) LIMIT 8";
+(action='account' AND (what='' OR what IS NULL))
+LIMIT 8";
        $SQLs[] = "UPDATE "._MYSQL_PREFIX."_member_menu SET action='main' WHERE
 action='stats' OR
 action='extras' OR
@@ -85,12 +86,9 @@ 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";
-       $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_user_refs";
 
        // Drop indexes
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_extensions DROP UNIQUE KEY (ext_name)";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes DROP UNIQUE KEY (theme_path)";
-       $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_themes DROP INDEX (theme_active)";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_admins DROP UNIQUE KEY (login)";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data DROP INDEX (status)";
        $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_refbanner DROP INDEX (visible)";
@@ -238,8 +236,8 @@ case "update": // Update an extension
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme', NULL, 'Themes','Verwalten Sie hier alle Designs (Themes) Ihres Mailtausch-Scriptes.', 8)";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_import','Importieren','Es wird das Verzeichnis "theme" nach neuen Ordnern durchsucht und anschliessend in die Datenbank gesperrt aufgenommen.', 1)";
                $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_admin_menu (`action`,`what`,`title`,`descr`,`sort`) VALUES ('theme','theme_edit','Modifizieren','Ändern Sie Titel, Freigaben usw. an den Themes. Sie können bis auf das Standart-Theme "default" auch Themes aus der Datenbank entfernen. Vorher sollten Sie es jedoch vom Server löschen, damit es niht erneut importiert werden kann.', 2)";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (action,what,title,sort,visible,locked) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')";
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action,what,title,sort,visible,locked) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_guest_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',4,'Y','N')";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('themes',NULL,'Design-Auswahl',3,'Y','N')";
                $SQLs[] = "DROP TABLE IF EXISTS "._MYSQL_PREFIX."_themes";
                $SQLs[] = "CREATE TABLE "._MYSQL_PREFIX."_themes (
 id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
@@ -351,7 +349,7 @@ PRIMARY KEY(id)
                break;
 
        case "0.2.7": // SQL queries for v0.2.7
-               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action, what, title, sort) VALUES ('main','themes','Designs', 6)";
+               $SQLs[] = "INSERT INTO "._MYSQL_PREFIX."_member_menu (action,what,title,sort) VALUES ('main','themes','Designs', 6)";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_user_data ADD curr_theme VARCHAR(255) NOT NULL DEFAULT 'default'";
                $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_config ADD stats_limit BIGINT(20) UNSIGNED NOT NULL DEFAULT '10'";
                $SQLs[] = "UPDATE "._MYSQL_PREFIX."_admin_menu SET what='config_stats' WHERE what='stats' LIMIT 1";
@@ -637,25 +635,23 @@ PRIMARY KEY (id)
        case "0.5.0": // SQL queries for v0.5.0
                $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `level`";
                $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refsystem` DROP INDEX `userid`, ADD UNIQUE `userid_level` (`userid`,`level`)";
-               $SQLs[] = "DROP TABLE IF EXISTS `"._MYSQL_PREFIX."_user_refs`";
-               $SQLs[] = "CREATE TABLE `"._MYSQL_PREFIX."_user_refs` (
-`id` bigint(20) NOT NULL auto_increment,
-`userid` bigint(20) NOT NULL DEFAULT 0,
-`level` smallint(6) NOT NULL DEFAULT 0,
-`refid` bigint(20) NOT NULL DEFAULT 0,
-`refback` float(4,1) NOT NULL DEFAULT 0.0,
-`points` FLOAT( 20,5) DEFAULT '0.00000' NOT NULL,
-PRIMARY KEY (`id`),
-UNIQUE `user_refid` (`userid`,`level`,`refid`),
-KEY (`level`),
-KEY (`refid`),
-) ENGINE=MyISAM COMMENT='User Referals With Refback'";
 
                // Update notes (these will be set as task text!)
                $UPDATE_NOTES = "Referal-System unterstützt nun detailierte Referal-Übersicht und vieles mehr.";
+               break;
+
+       case "0.5.1": // SQL queries for v0.5.1
+               $SQLs[] = "ALTER TABLE "._MYSQL_PREFIX."_member_menu DROP `descr`";
 
-               // Execute this special file on this update
-               $INC_POOL[] = PATH."inc/gen_refback.php";
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Beschreibungsspalte von Mitgliedsmenü entfernt, welche ohnehin nicht genutzt wird.";
+               break;
+
+       case "0.5.2": // SQL queries for v0.5.2
+               $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_refdepths` CHANGE `percents` `percents` FLOAT(8,5) NOT NULL DEFAULT '0.00000'";
+
+               // Update notes (these will be set as task text!)
+               $UPDATE_NOTES = "Prozents&aum;tze können nun fünf Stelle hinter dem Komma sein.";
                break;
        }
        break;