}
// Version number
-$EXT_VERSION = "0.4.9";
+$EXT_VERSION = "0.5.0";
// 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");
+$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");
switch ($EXT_LOAD_MODE)
{
$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."_config CHANGE auto_purge auto_purge BIGINT(20) UNSIGNED NOT NULL DEFAULT '1209600'";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "In der Tabelle <STRONG>mxchange_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)";
+ $UPDATE_NOTES = "In der Tabelle <STRONG>"._MYSQL_PREFIX."_config</STRONG> musste die Spalte <STRONG>auto_purge</STRONG> (autom. Löschen von Bestätigungsmails angepasst werden (war auf dem Testsystem auf tiny(4) gesetzt.)";
break;
case "0.0.3": // SQL queries for v0.0.3
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "User-Hash zum Bestätigen wird auf NULL gesetzt, wenn Account bestätigt wird.";
break;
+
+ 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,
+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.";
+
+ // Execute this special file on this update
+ $INC_POOL[] = PATH."inc/gen_refback.php";
+ break;
}
break;
default: // Do stuff when extension is loaded
// When the sql_patches is not installed we cannot load it's configuration... *sigh*
if (GET_EXT_VERSION("sql_patches") != '') {
- $_CONFIG['secret_key'] = "";
+ // Init key
+ $_CONFIG['secret_key'] = "";
// Read key from secret file
if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) {
$EXT_ALWAYS_ACTIVE = "Y";
//
-?>
\ No newline at end of file
+?>