43,7 → 43,10 |
include_once dirname(realpath(__FILE__)).'/../papyrus/configuration/pap_config.inc.php' ; |
include_once PAP_CHEMIN_API_PEAR.'Auth.php' ; |
include_once 'DB.php' ; |
include_once 'Net/URL.php' ; |
|
$NetUrl = new Net_URL(); |
$url = $NetUrl->getUrl(); |
// Connection à la base de donnée |
$GLOBALS['db'] =& DB::connect(PAP_DSN) ; |
|
50,7 → 53,7 |
// Cette variable contiendra le javascript de validation des formulaires |
$GLOBALS['javascript'] = '' ; |
|
$url = $_SERVER['REQUEST_URI'] ; |
|
if ($_SERVER['SCRIPT_NAME'] == '/actu/index.php') { |
$url .= 'sommaire.php3' ; |
} |
90,11 → 93,12 |
$GLOBALS['identification']->start(); |
|
// On teste si la variable logout existe, si oui, on deconnecte |
if (isset($logout) && $logout != '') { |
if (isset($logout) && $logout != '' && $GLOBALS['identification']->checkAuth()) { |
// On place les cookies avec une durée dépassée |
setcookie('spip_session', '', time() - 3600, '/actu/') ; |
setcookie('spip_admin', '', time() - 3600, '/actu/') ; |
$GLOBALS['identification']->logout(); |
$NetUrl->removeQueryString('logout'); |
} |
|
include_once 'spip_cookie.php' ; |