************************************************************************/
// Some security stuff...
-if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF'])))
-{
+if ((ereg(basename(__FILE__), $_SERVER['PHP_SELF']))) {
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Version number
-$EXT_VERSION = "0.4.1";
+$EXT_VERSION = "0.4.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");
+$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");
switch ($EXT_LOAD_MODE)
{
// Update notes (these will be set as task text!)
$UPDATE_NOTES = "Tabellen-Schlüssel neu gesetzt und Parsing-Zeit im Footer eingeblendet.";
break;
+
+ case "0.4.2": // SQL queries for v0.4.2
+ $SQLs[] = "ALTER TABLE `"._MYSQL_PREFIX."_online` ADD INDEX `admin_member` (`is_admin`, `is_member`)";
+ break;
}
break;
$dummy = LOAD_CONFIG();
// When the sql_patches is not installed we cannot load it's configuration... *sigh*
- if (GET_EXT_VERSION("sql_patches") != "") {
+ if (GET_EXT_VERSION("sql_patches") != '') {
$_CONFIG['ext_autopurge'] = $dummy['ext_autopurge'];
$_CONFIG['mails_page'] = $dummy['mails_page'];
$_CONFIG['index_home'] = $dummy['index_home'];
$_CONFIG['show_timings'] = $dummy['show_timings'];
// Read key from secret file
- if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble'])))
- {
+ if ((empty($_CONFIG['file_hash'])) || (empty($_CONFIG['master_salt'])) || (empty($_CONFIG['pass_scramble']))) {
// Maybe need setup of secret key!
require_once(PATH."inc/gen_sql_patches.php");
- if (GET_EXT_VERSION("cache") >= "0.1.2")
- {
+ if (GET_EXT_VERSION("cache") >= "0.1.2") {
// Remove extensions and mod_reg cache file
require_once(PATH."inc/libs/cache_functions.php");
require_once(PATH."inc/extensions/ext-cache.php");
}
// Test again
- if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble'])))
- {
+ if ((!empty($_CONFIG['file_hash'])) && (!empty($_CONFIG['master_salt'])) && (!empty($_CONFIG['pass_scramble']))) {
// File hash fas generated so we can also file the secret file... hopefully.
- if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash'])))
- {
+ if ((file_exists(PATH."inc/.secret/.".$_CONFIG['file_hash'])) && (is_readable(PATH."inc/.secret/.".$_CONFIG['file_hash']))) {
$_CONFIG['secret_key'] = implode("", file(PATH."inc/.secret/.".$_CONFIG['file_hash']));
- }
- else
- {
+ } else {
// Cannot read secret file!
mxchange_die("Cannot read secret file!");
}