Yoshihisa Fukuhara
higef****@users*****
2006年 5月 16日 (火) 17:38:50 JST
Index: affelio/apps/bb/bb/Comment.pm
diff -u affelio/apps/bb/bb/Comment.pm:1.3 affelio/apps/bb/bb/Comment.pm:1.4
--- affelio/apps/bb/bb/Comment.pm:1.3 Mon Mar 27 23:55:43 2006
+++ affelio/apps/bb/bb/Comment.pm Tue May 16 17:38:50 2006
@@ -209,14 +209,18 @@
$self->{dbh}->do("UPDATE $self->{topic_tb} SET last_user = '$user', last_afid = '$afid', update_time = $time WHERE topic_id = $topic_id");
- $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);
$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.");
+ }
}
-
##############################################
# deleteReply
##############################################
Index: affelio/apps/bb/bb/Forum.pm
diff -u affelio/apps/bb/bb/Forum.pm:1.3 affelio/apps/bb/bb/Forum.pm:1.4
--- affelio/apps/bb/bb/Forum.pm:1.3 Mon Mar 27 23:55:43 2006
+++ affelio/apps/bb/bb/Forum.pm Tue May 16 17:38:50 2006
@@ -224,13 +224,16 @@
$self->{dbh}->do("INSERT INTO $self->{forum_tb} (category_id, title, description, timestamp, update_time, user, afid, pwd, last_user, last_afid, topics, posts, status, lock, ord) VALUES ($category_id, '$title', '$description', $time, $time, '$user', '$afid', '$crypt', '$user', '$afid', 0, 0,0,0,0)");
my $forum_id=$self->getColumn("SELECT MAX(forum_id) FROM $self->{forum_tb} WHERE category_id = $category_id");
- $self->{afap}->post_news($title, "", $user,
- $self->{afap}->get_site_info("web_root") . "/apps/".
- $self->{afap}->{install_name} . "/index.cgi?mode=view_forum&f_id=".$forum_id);
-
$description =~ s/<br[^>]*>/\n/g;
$self->sendBbMail("æ°ãããã©âã©ã ã$titleãã$userããã«ãã£ã¦ä½æããã¾ããã\n\n-----\n$description\n\n$self->{afap}->{app__web_root}/index.cgi?mode=view_forum&f_id=$forum_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_forum&f_id=".$forum_id);
+ } catch Error with {
+ my $err = shift;
+ debug_print("post_news error.");
+ }
return $forum_id;
}
Index: affelio/apps/bb/bb/Topic.pm
diff -u affelio/apps/bb/bb/Topic.pm:1.3 affelio/apps/bb/bb/Topic.pm:1.4
--- affelio/apps/bb/bb/Topic.pm:1.3 Mon Mar 27 23:55:43 2006
+++ affelio/apps/bb/bb/Topic.pm Tue May 16 17:38:50 2006
@@ -156,10 +156,6 @@
$status=0 unless ($status_edit);
my $topic_id=addTopic($bb, $bb->{f_id}, $title, $description, $icon,$user, $afid, $pwd, $status);
- my $current_forum = $bb->getForum($bb->{f_id});
- $bb->updateCategoryInfo($current_forum->{category_id}, $user, $afid);
- $bb->createReplyTable($topic_id);
-
$output_ref->{DONE} = "1";
$output_ref->{T_ID} = $topic_id;
$output_ref->{MSG} = "New Topic was created.";
@@ -235,12 +231,21 @@
$num_posts = $num_posts+$num_topics;
$self->{dbh}->do("UPDATE $self->{forum_tb} SET topics = $num_topics, posts = $num_posts, last_user = '$user', last_afid = '$afid', update_time = $time WHERE forum_id = $forum_id");
- $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);
+ my $current_forum = $self->getForum($forum_id);
+ $self->updateCategoryInfo($current_forum->{category_id}, $user, $afid);
+ $self->createReplyTable($topic_id);
+
$description =~ s/<br[^>]*>/\n/g;
$self->sendBbMail("æ°ãããããã¯ã$titleãã$userããã«ãã£ã¦ä½æããã¾ããã\n\n-----\n$description\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.");
+ }
return $topic_id;
}