(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))";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='main' WHERE
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='main' WHERE
action='stats' OR
action='extras' OR
action='rals' OR
$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 <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 TINYINT(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 TINYINT(4) gesetzt.)";
break;
case "0.0.3": // SQL queries for v0.0.3
break;
case "0.1.1": // SQL queries for v0.1.1
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Home-/Eingangsseite', descr='Stellen Sie hier ein, welcher Menüpunkt (what-welcome ist Standart) als Einstiegspunkt in das Menüsystem genutzt werden soll und wie die automatische Weiterleitung in der Eingangsseite funktionieren soll.' WHERE `what`='config_home' LIMIT 1";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_delay TINYINT(3) UNSIGNED NOT NULL DEFAULT '-1'";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_config` ADD index_cookie BIGINT(20) UNSIGNED NOT NULL DEFAULT ".(getConfig('one_day')*365)."";
$SQLs[] = "ALTER TABLE `{!_MYSQL_PREFIX!}_extensions` DROP ext_has_admin";
// Update notes (these will be set as task text!)
- $UPDATE_NOTES = "Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.";
+ $UPDATE_NOTES = "Spalte <u>ext_has_admin</u> aus der Tabelle <u>{!_MYSQL_PREFIX!}_extensions</u> entfernt, da sie keinen Sinn mehr macht.";
break;
case "0.1.6": // SQL queries for v0.1.6
case "0.2.4": // SQL queries for v0.2.4
$auto_type = "png"; // PNG image is the default
- if ((FILE_READABLE(PATH."theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
+ if ((INCLUDE_READABLE("theme/".GET_CURR_THEME()."/images/code_bg.jpg")) && function_exists('imagecreatefromjpeg')) {
// Switch to JPEG format
$auto_type = "jpg";
}
break;
case "0.3.0": // SQL queries for v0.3.0
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET title='Mailvergütungen...' WHERE `what`='payments' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='{!POINTS!}/Referal-Ebenen' WHERE `what`='config_points' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_admin_menu` SET `title`='Mailvergütungen...' WHERE `what`='payments' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Zwei Menüpunkte umbenannt.";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('extras',NULL,'Extras',5,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('rals',NULL,'Rallyes',6,'Y','N')";
$SQLs[] = "INSERT INTO `{!_MYSQL_PREFIX!}_member_menu` (`action`,`what`,`title`,`sort`,`visible`,`locked`) VALUES ('account',NULL,'Ihr Account',7,'Y','N')";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='stats', sort='1', title='Klick-Mails' WHERE `what`='stats' LIMIT 1";
- $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET action='extras', sort='3' WHERE `what`='reflinks' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='stats', `sort`='1', `title`='Klick-Mails' WHERE `what`='stats' LIMIT 1";
+ $SQLs[] = "UPDATE `{!_MYSQL_PREFIX!}_member_menu` SET `action`='extras', `sort`='3' WHERE `what`='reflinks' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Mitgliedsmenü komplett umgebaut.";
break;
case "0.5.7": // SQL queries for v0.5.7
- $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE what='list_norefs' LIMIT 1";
+ $SQLs[] = "DELETE LOW_PRIORITY FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE `what`='list_norefs' LIMIT 1";
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Auflistung der Mitglieder ohne Werber nach what=list_user&mode=norefs verschoben.";
// When the sql_patches is not installed we cannot load it's configuration... *sigh*
if (GET_EXT_VERSION("sql_patches") != '') {
// Init key
- $_CONFIG['secret_key'] = "";
+ setConfigEntry('secret_key', "");
// Read key from secret file
if ((getConfig('file_hash') == "") || (getConfig('master_salt') == "") || (getConfig('pass_scramble') == "")) {
// Cache instance
- global $cacheInstance;
-
// Maybe need setup of secret key!
LOAD_INC_ONCE("inc/gen_sql_patches.php");
// @TODO Rewrite this to a filter!
- if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($cacheInstance)) && (is_object($cacheInstance))) {
+ if ((GET_EXT_VERSION("cache") >= "0.1.2") && (isset($GLOBALS['cache_instance'])) && (is_object($GLOBALS['cache_instance']))) {
// Remove extensions and mod_reg cache file
LOAD_INC_ONCE("inc/libs/cache_functions.php");
- LOAD_INC_ONCE("inc/extensions/ext-cache.php");
- if ($cacheInstance->loadCacheFile("extensions", true)) $cacheInstance->destroyCacheFile();
- if ($cacheInstance->loadCacheFile("mod_reg")) $cacheInstance->destroyCacheFile();
+ require(sprintf("%sinc/extensions/ext-cache.php", constant('PATH')));
+ if ($GLOBALS['cache_instance']->loadCacheFile("extensions", true)) $GLOBALS['cache_instance']->destroyCacheFile();
+ if ($GLOBALS['cache_instance']->loadCacheFile("mod_reg")) $GLOBALS['cache_instance']->destroyCacheFile();
} // END - if
} // END - if
$hashFile = sprintf("%sinc/.secret/.%s", constant('PATH'), getConfig('file_hash'));
if (FILE_READABLE($hashFile)) {
// Read file
- $_CONFIG['secret_key'] = READ_FILE($hashFile);
+ setConfigEntry('secret_key', READ_FILE($hashFile));
} else {
// Remove it from database
UPDATE_CONFIG("file_hash", "");
define('_MAX' , getConfig('rand_no'));
} else {
// Set some lame ( ;-) ) default settings
- $_CONFIG['def_refid'] = 0;
- $_CONFIG['enable_title_deco'] = "N";
- $_CONFIG['title_mod_show'] = "Y";
- $_CONFIG['title_middle'] = "-";
- // @TODO Can we remove this? $_CONFIG['verbose_sql'] = "N";
- define('MT_WORD' , DEFAULT_MT_WORD );
- define('MT_WORD2', DEFAULT_MT_WORD2);
- define('MT_WORD3', DEFAULT_MT_WORD3);
- define('POINTS' , DEFAULT_POINTS);
+ setConfigEntry('def_refid' , 0);
+ setConfigEntry('enable_title_deco', "N");
+ setConfigEntry('title_mod_show' , "Y");
+ setConfigEntry('title_middle' , "-");
+ // @TODO Can we remove this? setConfigEntry('verbose_sql' , "N");
+ define('MT_WORD' , getMessage('DEFAULT_MT_WORD'));
+ define('MT_WORD2', getMessage('DEFAULT_MT_WORD2'));
+ define('MT_WORD3', getMessage('DEFAULT_MT_WORD3'));
+ define('POINTS' , getMessage('DEFAULT_POINTS'));
}
break;
}