|
From: mdw c. <myd...@li...> - 2001-11-14 15:47:05
|
MyDynaWeb CVS committal
Author : sukria
Project : mydynaweb
Module : htdocs
Dir : mydynaweb/htdocs/tools/events
Modified Files:
session.php
Log Message:
There was a big bug before :
when you were logged as a member of the site, you couldn't log in the admin section (as super user).
Indeed, the user cookie was not removed and the superuser cookie was never seen by the browser.
No the session library manage properly cookies :
when it set a cookie, it first removes the previous one.
It works fine now : you can log in as member and just after log in as super user.
===================================================================
RCS file: /cvsroot/mydynaweb/mydynaweb/htdocs/tools/events/session.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- session.php 2001/10/10 21:28:17 1.3
+++ session.php 2001/11/14 15:47:03 1.4
@@ -33,7 +33,8 @@
$rqt->query($DBH, $sql) or send_sql_error($PHP_SELF, $sql, $rqt->error());
// we put a cookie with this session ID on the computer
- setcookie('DYNA_SESSION', $session, 0);
+ setcookie('DYNA_SESSION'); //delete the previous cookie if exists
+ setcookie('DYNA_SESSION', $session, 0, '/'); //set the new one
return(1);
}
|