Yoshihisa Fukuhara
higef****@users*****
2006年 5月 16日 (火) 19:14:01 JST
Index: affelio/apps/bb/bb/Top.pm
diff -u affelio/apps/bb/bb/Top.pm:1.1 affelio/apps/bb/bb/Top.pm:1.2
--- affelio/apps/bb/bb/Top.pm:1.1 Thu Mar 23 12:46:14 2006
+++ affelio/apps/bb/bb/Top.pm Tue May 16 19:14:01 2006
@@ -47,6 +47,7 @@
my $i=0;
my $j=0;
my $forum_edit = $bb->getPermission("forum_edit");
+ my $edit_forum = 0;
@categories = $bb->getAllCategories;
$output_ref->{PAGE_TITLE} = $pref{'title'};
@@ -68,6 +69,18 @@
$abst = $_->{description};
}
utf8::encode($abst);
+
+ if ($bb->getPermission("forum_edit")){
+ if ($bb->{pb_user} eq "0"){
+ if ($_->{pwd} eq "" && $_->{afid} eq $bb->{afid}){
+ $edit_forum = 1;
+ }
+ }elsif($_->{pwd} ne ""){
+ $edit_forum = 1;
+ }
+ }
+ $edit_forum=1 if ($bb->{afap}->get_visitor_info("type") eq "self");
+
push @forums_param,
{
C_ID => $_->{category_id},
@@ -84,6 +97,7 @@
TIME => sprintf("%02d:%02d", $hour, $min),
LAST_USER =>$_->{last_user},
LAST_AFID =>$bb->getUserURI($_->{last_afid}),
+ EDIT_FORUM => $edit_forum,
};
$j++;
}
Index: affelio/apps/bb/bb/ViewForum.pm
diff -u affelio/apps/bb/bb/ViewForum.pm:1.1 affelio/apps/bb/bb/ViewForum.pm:1.2
--- affelio/apps/bb/bb/ViewForum.pm:1.1 Thu Mar 23 12:46:14 2006
+++ affelio/apps/bb/bb/ViewForum.pm Tue May 16 19:14:01 2006
@@ -95,6 +95,7 @@
########### Set Topic List ####################################################
foreach(@topics) {
my $abst;
+ my $edit_topic=0;
my ($sec, $min, $hour, $mday, $mon, $year) = localtime($_->{update_time});
$mon+=1;
$year+=1900;
@@ -120,10 +121,22 @@
$abst = $_->{description};
}
utf8::encode($abst);
+
+ if ($bb->getPermission("topic_edit")){
+ if ($bb->{pb_user} eq "0"){
+ if ($_->{pwd} eq "" && $_->{afid} eq $bb->{afid}){
+ $edit_topic = 1;
+ }
+ }elsif($_->{pwd} ne ""){
+ $edit_topic = 1;
+ }
+ }
+ $edit_topic=1 if ($bb->{afap}->get_visitor_info("type") eq "self");
push @topic_list,
{
T_ID => $_->{topic_id},
+ F_ID => $_->{forum_id},
TITLE => $_->{title},
ABST => $bb->n2br($abst),
POSTS => $_->{posts},
@@ -137,6 +150,7 @@
LAST_USER => $_->{last_user},
LAST_AFID => $bb->getUserURI($_->{last_afid}),
ICON => $icon,
+ EDIT_TOPIC => $edit_topic,
};
}