[Affelio-cvs 252] CVS update: affelio/lib/Affelio/Managing

Back to archive index

Tadashi Okoshi slash****@users*****
2005年 6月 28日 (火) 23:07:22 JST


Index: affelio/lib/Affelio/Managing/MessageManager.pm
diff -u affelio/lib/Affelio/Managing/MessageManager.pm:1.4 affelio/lib/Affelio/Managing/MessageManager.pm:1.5
--- affelio/lib/Affelio/Managing/MessageManager.pm:1.4	Tue Jun 28 21:32:23 2005
+++ affelio/lib/Affelio/Managing/MessageManager.pm	Tue Jun 28 23:07:21 2005
@@ -4,7 +4,7 @@
 #    http://affelio.jp/ (Japan)
 #    http://affelio.jp/ (USA and other area)
 #
-# $Id: MessageManager.pm,v 1.4 2005/06/28 12:32:23 slash5234 Exp $
+# $Id: MessageManager.pm,v 1.5 2005/06/28 14:07:21 slash5234 Exp $
 
 package Affelio::Managing::MessageManager;
 {
@@ -137,9 +137,9 @@
     sub post_message{
 	my $self = shift;
 	my $from = shift;    #1
-	my $title = shift;          #2
-	my $type = shift;           #3
-	my $body = shift;           #4
+	my $title = shift;   #2
+	my $type = shift;    #3
+	my $body = shift;    #4
 
 	my $af = $self->{af};
 
@@ -167,11 +167,14 @@
 	Affelio::misc::Debug::debug_print("MM::post_message: Writing to DB...");
 	Affelio::misc::Debug::debug_print("MM::post_message: [$body]");
 
+	Affelio::misc::Debug::debug_print("size [" . length($body) ."]");
+
 	##############################
 	#Insert a new record
-	my $str1 = "insert into AFuser_CORE_message(mid, timestamp, msgtitle, msgtype, msgfrom, msgbody, readflag) values ($newid, '$cur_time', '$title', '$type', '$from', '$body', 0)";
-	$sth = $af->{db}->prepare($str1) or die $af->{db}->errstr;
+	my $str10 = "insert into AFuser_CORE_message(msgbody, mid, timestamp, msgtitle, msgtype, msgfrom, readflag) values ('$body', $newid, '$cur_time', '$title', '$type', '$from', 0)";
+	$sth = $af->{db}->prepare($str10) or die $af->{db}->errstr;
 	$sth->execute or  die $af->{db}->errstr;
+	undef($sth);
 
 	##############################
 	#Email notification if needed


Affelio-cvs メーリングリストの案内
Back to archive index