performance enhancements

This commit is contained in:
Roland Gruber 2007-07-08 19:23:07 +00:00
parent 20894db9da
commit cd09a86d64
1 changed files with 2 additions and 3 deletions

View File

@ -41,8 +41,6 @@ checkClientIP();
* The script is stopped if one of the checks fail.
*/
function startSecureSession() {
// check if client IP is on the list of valid IPs
checkClientIP();
// start session
if (isset($_SESSION)) unset($_SESSION);
$sessionDir = substr(__FILE__, 0, strlen(__FILE__) - 17) . "/sess";
@ -75,7 +73,8 @@ function startSecureSession() {
*
*/
function checkClientIP() {
$cfg = new LAMCfgMain();
if (isset($_SESSION['cfgMain'])) $cfg = $_SESSION['cfgMain'];
else $cfg = new LAMCfgMain();
$allowedHosts = $cfg->allowedHosts;
// skip test if no hosts are defined
if ($allowedHosts == "") return;