[Affelio-cvs 1263] CVS update: affelio/apps/bb/bb

Back to archive index

Yoshihisa Fukuhara higef****@users*****
2006年 5月 17日 (水) 11:30:32 JST


Index: affelio/apps/bb/bb/Comment.pm
diff -u affelio/apps/bb/bb/Comment.pm:1.4 affelio/apps/bb/bb/Comment.pm:1.5
--- affelio/apps/bb/bb/Comment.pm:1.4	Tue May 16 17:38:50 2006
+++ affelio/apps/bb/bb/Comment.pm	Wed May 17 11:30:32 2006
@@ -14,7 +14,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-
 package bb::Comment;
 {
     use strict;
@@ -39,8 +38,8 @@
 	$output_ref->{tmpl_file} = $bb->{afap}->{app__fs_root}."/templates/comment.tmpl";	
 	my $wi = new Affelio::misc::WebInput();
 	my $action = $wi->PTN_mode($cgi->param("action"));
-	$bb->errorExit('<AF_M text="Please specify the forum.">') if ($bb->{f_id} =~ /\D/);
-	$bb->errorExit('<AF_M text="Please specify the Topic.">') if ($bb->{t_id} =~ /\D/ || $bb->{t_id} eq "");
+	$bb->errorExit('<AF_M text="Please specify the forum.">') if ($bb->{f_id} =~ /ツ・D/);
+	$bb->errorExit('<AF_M text="Please specify the Topic.">') if ($bb->{t_id} =~ /ツ・D/ || $bb->{t_id} eq "");
 	$bb->errorExit('<AF_M text="This topic is locked.">') if ($bb->getColumn("SELECT lock FROM $bb->{topic_tb} WHERE topic_id=$bb->{t_id}"));
 	my $r_id = $wi->PTN_num($cgi->param("r_id"));
 	my $reply_title = $bb->escape_all($cgi->param("reply_title"));
@@ -122,7 +121,7 @@
 	$bb->errorExit('<AF_M text="Please input a password.">') if($pwd eq "");
     }
     addComment($bb, $bb->{t_id}, $reply_title, $user_name, $afid, $comment, $pwd, $icon);
-    $output_ref->{SUBMIT} = "1";
+    $output_ref->{SUBMIT} = '1';
     $output_ref->{T_ID} = $bb->{t_id};
 }
 
@@ -131,7 +130,7 @@
 ##############################################
 sub do_Delete {
     my ($bb, $output_ref, $r_id, $user_name, $afid, $pwd) =@_;
-    $bb->errorExit('<AF_M text="Please specify the comment.">') if ($r_id =~ /\D/ || $r_id eq "");
+    $bb->errorExit('<AF_M text="Please specify the comment.">') if ($r_id =~ /ツ・D/ || $r_id eq "");
     my $reply = getReply($bb, $bb->{t_id}, $r_id);
     if ($bb->{afap}->get_visitor_info("type") eq "self"){
 	deleteReply($bb, $bb->{t_id}, $r_id);
@@ -164,7 +163,7 @@
 ##############################################
 sub delete_Comment {
     my ($bb, $output_ref, $r_id, $afid) =@_;
-    $bb->errorExit('<AF_M text="Please specify the comment.">') if ($r_id =~ /\D/ || $r_id eq "");
+    $bb->errorExit('<AF_M text="Please specify the comment.">') if ($r_id =~ /ツ・D/ || $r_id eq "");
     my $reply = getReply($bb, $bb->{t_id}, $r_id);
     if ($bb->{afap}->get_visitor_info("type") eq "self"){
 	$output_ref->{PWD} = "0";
@@ -211,14 +210,14 @@
     
     $comment =~ s/<br[^>]*>/\n/g;
     $self->sendBbMail("$userさんが掲示板に書き込みました。\n\n-----\n$title\n$comment\n\n$self->{afap}->{app__web_root}/index.cgi?mode=view_topic&t_id=$topic_id", $title);
-    try{
-	$self->{afap}->post_news($title, "", $user,
-		     $self->{afap}->get_site_info("web_root") . "/apps/". 
-		     $self->{afap}->{install_name} . "/index.cgi?mode=view_topic&t_id=".$topic_id);
-    } catch Error with {
-	my $err = shift;
-	debug_print("post_news error.");
-    }
+
+#    try{
+	my $uri = $self->{afap}->get_site_info("web_root") . "/apps/".$self->{afap}->{install_name} . "/index.cgi?mode=view_topic&t_id=".$topic_id;
+	$self->{afap}->post_news($title, "", $user, $uri);
+#    } catch Error with {
+#	my $err = shift;
+#	debug_print("post_news error.");
+#    }
 }
 
 ##############################################
Index: affelio/apps/bb/bb/Topic.pm
diff -u affelio/apps/bb/bb/Topic.pm:1.4 affelio/apps/bb/bb/Topic.pm:1.5
--- affelio/apps/bb/bb/Topic.pm:1.4	Tue May 16 17:38:50 2006
+++ affelio/apps/bb/bb/Topic.pm	Wed May 17 11:30:32 2006
@@ -157,6 +157,7 @@
     my $topic_id=addTopic($bb, $bb->{f_id}, $title, $description, $icon,$user, $afid, $pwd, $status);
 
     $output_ref->{DONE}	=	"1";
+    $output_ref->{F_ID}	=	$bb->{f_id};
     $output_ref->{T_ID}	=	$topic_id;
     $output_ref->{MSG}	=	"New Topic was created.";
 }


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