Tadashi Okoshi
slash****@users*****
2006年 1月 28日 (土) 17:47:21 JST
Index: affelio/outgoing.cgi
diff -u affelio/outgoing.cgi:1.13 affelio/outgoing.cgi:1.14
--- affelio/outgoing.cgi:1.13 Mon Dec 19 16:10:19 2005
+++ affelio/outgoing.cgi Sat Jan 28 17:47:21 2006
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-# $Id: outgoing.cgi,v 1.13 2005/12/19 07:10:19 slash5234 Exp $
+# $Id: outgoing.cgi,v 1.14 2006/01/28 08:47:21 slash5234 Exp $
use strict;
@@ -43,7 +43,9 @@
my $cfg_dir = "./config/";
my $af;
try{
- $af = new Affelio(ConfigDir => $cfg_dir);
+ $af = new Affelio(ConfigDir => $cfg_dir,
+ CGI => $q);
+
}catch Error with{
my $e = shift;
error($q, "Affelio load error.\n" . $e);
@@ -53,15 +55,7 @@
############################################################################
#Check session w/ cookie
############################################################################
-my $sid = $q->cookie("affelio-$af->{user__nickname}");
-my $session = new CGI::Session(undef,
- $sid,
- {Directory=> $af->{site__session_dir}});
-if( $sid != $session->id ){
- debug_print("outgoing.cgi: session deleted.");
- $session->delete();
- undef($session);
-}
+my $session = $af->getSM()->get_session();
my $visitor_type="pb";
my $visitor_nickname="anonymous";
Index: affelio/incoming.cgi
diff -u affelio/incoming.cgi:1.16 affelio/incoming.cgi:1.17
--- affelio/incoming.cgi:1.16 Mon Dec 19 16:10:19 2005
+++ affelio/incoming.cgi Sat Jan 28 17:47:21 2006
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: incoming.cgi,v 1.16 2005/12/19 07:10:19 slash5234 Exp $
+# $Id: incoming.cgi,v 1.17 2006/01/28 08:47:21 slash5234 Exp $
use strict;
@@ -43,25 +43,19 @@
my $cfg_dir = "./config/";
my $af;
try{
- $af = new Affelio(ConfigDir => $cfg_dir);
+ $af = new Affelio(ConfigDir => $cfg_dir,
+ CGI => $q );
}catch Error with{
my $e = shift;
error($q, "Affelio load error.\n" . $e);
};
my $wi = new Affelio::misc::WebInput();
-my $sid = $q->cookie("affelio-$af->{user__nickname}");
-debug_print("incoming.cgi: sid from cookie = $sid");
-my $session="";
-if($sid){
- $session = new CGI::Session(undef,
- $sid,
- {Directory=> $af->{site__session_dir}});
- if( $sid != $session->id ){
- debug_print("incoming.cgi: session deleted.");
- $session->delete();
- undef($session);
- }
-}
+
+############################################################################
+#Load session
+############################################################################
+my $session = $af->getSM()->get_session();
+
############################################################################
#Get args
Index: affelio/index.cgi
diff -u affelio/index.cgi:1.32 affelio/index.cgi:1.33
--- affelio/index.cgi:1.32 Mon Dec 26 01:50:28 2005
+++ affelio/index.cgi Sat Jan 28 17:47:21 2006
@@ -16,7 +16,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: index.cgi,v 1.32 2005/12/25 16:50:28 slash5234 Exp $
+# $Id: index.cgi,v 1.33 2006/01/28 08:47:21 slash5234 Exp $
use strict;
@@ -45,7 +45,8 @@
my $cfg_dir = "./config/";
my $af;
try{
- $af = new Affelio(ConfigDir => $cfg_dir);
+ $af = new Affelio(ConfigDir => $cfg_dir,
+ CGI => $q);
}catch Error with{
my $e = shift;
error($q, "Affelio load error.\n" . $e);
@@ -54,22 +55,9 @@
############################################################################
#Check session w/ cookie
############################################################################
-my $given_sid = $q->cookie("affelio-$af->{user__nickname}");
-debug_print("index.cgi: sid from cookie = $given_sid");
-my $session;
-if($given_sid ne ""){
- $session = new CGI::Session(undef,
- $given_sid,
- {Directory=> $af->{site__session_dir}});
- debug_print("index.cgi: startup sid given=[" . $given_sid . "]");
- debug_print("index.cgi: startup sid new =[" . $session->id . "]");
- if( $given_sid != $session->id ){
- debug_print("index.cgi: session deleted.");
- $session->delete();
- undef($session);
- }
-}
+my $session = $af->getSM()->get_session();
+############################################################################
my $visitor_type="pb";
my $visitor_nickname="anonymous";
my $visitor_afid="";