From 0ccef41b08a00d2d0732a138593ff8add1225641 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Wed, 30 Jun 2004 16:29:34 +0000 Subject: [PATCH] =?UTF-8?q?Modif=20de=20l'utilisation=20de=20Pear,=20d=E9s?= =?UTF-8?q?ormais=20le=20code=20n=E9cessaire=20est=20inclus=20dans=20Dolib?= =?UTF-8?q?arr?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/main.inc.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index eee66d68cf8..5769d6e0107 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -34,6 +34,20 @@ else Header("Location: install/index.php"); } } +/* + * + * + * +$GLOBALS['sessionid'] = isset($_GET['sessionid']) ? $_GET['sessionid'] : $_COOKIE['sessionid']; +if(!$GLOBALS['sessionid']) +{ + Header('Location: /login.php'); + exit; +} +* + * + * + */ define('DOL_DOCUMENT_ROOT', $dolibarr_main_document_root); @@ -121,8 +135,11 @@ else print "

Vous devez respecter un de ces pré-requis pour continuer.\n"; exit ; } + + // /usr/share/pear - require_once "Auth/Auth.php"; + //require_once "Auth/Auth.php"; + require_once DOL_DOCUMENT_ROOT."/includes/pear/Auth/Auth.php"; $params = array( "dsn" => $conf->db->getdsn(), @@ -131,7 +148,7 @@ else "passwordcol" => "pass", "cryptType" => "none", ); - $aDol = new Auth("DB", $params, "loginFunction"); + $aDol = new DOLIAuth("DB", $params, "loginFunction"); $aDol->start(); $result = $aDol->getAuth(); if ($result)