Yoshihisa Fukuhara
higef****@users*****
2005年 12月 19日 (月) 21:11:55 JST
Index: affelio/apps/bb/bb.pm
diff -u affelio/apps/bb/bb.pm:1.1 affelio/apps/bb/bb.pm:1.2
--- affelio/apps/bb/bb.pm:1.1 Mon Dec 19 15:46:27 2005
+++ affelio/apps/bb/bb.pm Mon Dec 19 21:11:55 2005
@@ -211,6 +211,10 @@
$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} . "/view_forum.cgi?f_id=".$forum_id);
+
$self->sendBbMail("New Forum $title was created by $user.\n");
return $forum_id;
@@ -249,6 +253,10 @@
$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} . "/view_topic.cgi?t_id=".$topic_id);
+
$self->sendBbMail("New Topic $title was created by $user.\n\n-----\n$description\n");
return $topic_id;
@@ -626,11 +634,14 @@
$self->{dbh}->do("UPDATE $self->{topic_tb} SET posts = posts+1 WHERE topic_id = $topic_id");
my $forum_id = $self->getColumn("SELECT forum_id FROM $self->{topic_tb} WHERE topic_id = $topic_id");
-# $self->{dbh}->do("UPDATE $self->{forum_tb} SET posts = posts+1 WHERE forum_id = $forum_id");
$self->{dbh}->do("UPDATE $self->{forum_tb} SET posts = posts+1, last_user = '$user', last_afid = '$afid', update_time = $time WHERE forum_id = $forum_id");
$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} . "/view_topic.cgi?t_id=".$topic_id);
+
$self->sendBbMail("New Comment $title was written by $user.\n\n-----\n$comment\n");
}