}
// Close file
fclose($zp);
+ cache_invalidate($filename);
}
}
else
}
// Close file
fclose($zp);
+ cache_invalidate($filename);
}
return true;
}
}
// Close file
fclose($zp);
+ cache_invalidate($filename);
}
}
else
$page_security = 'SA_CREATEMODULES';
$path_to_root="..";
include_once($path_to_root . "/includes/session.inc");
+
include_once($path_to_root."/includes/packages.inc");
+include_once($path_to_root . "/admin/db/maintenance_db.inc");
+include_once($path_to_root . "/includes/ui.inc");
if ($SysPrefs->use_popup_windows) {
$js = get_js_open_window(900, 500);
}
page(_($help_context = "Install Themes"), false, false, '', $js);
-include_once($path_to_root . "/includes/date_functions.inc");
-include_once($path_to_root . "/admin/db/company_db.inc");
-include_once($path_to_root . "/admin/db/maintenance_db.inc");
-include_once($path_to_root . "/includes/ui.inc");
-
//---------------------------------------------------------------------------------------------
if (($id = find_submit('Delete', false)) && isset($installed_extensions[$id])
return array_combine($keys, array_fill(count($keys), $value));
}
}
+
return false;
}
+
+/*
+ Ensure file is re-read on next request if php caching is active
+*/
+function cache_invalidate($filename)
+{
+ if (function_exists('opcache_invalidate')) // OpCode extension
+ opcache_invalidate($filename);
+}
+
/*
Simple brute force attack detection is performed before connection to company database is open. Therefore access counters have to be stored in file.
Login attempts counter is created for every new user IP, which partialy prevent DOS attacks.
if ((!file_exists($filename) && is_writable($path_to_root.'/tmp')) || is_writable($filename))
{
file_put_contents($filename, $msg);
+ cache_invalidate($filename);
}
}
ini_set("log_errors", "On");
}
-
/*
Uncomment the setting below when using FA on shared hosting
to avoid unexpeced session timeouts.