Skip to content

Commit

Permalink
Fixes for commentcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianAker committed May 6, 2003
1 parent 1d45e2d commit 5377ac7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Slash/DB/MySQL/MySQL.pm
Expand Up @@ -5299,14 +5299,15 @@ sub createStory {
}
my $section = $self->getSection($story->{section});
my $rootdir = $section->{rootdir} || $constants->{rootdir};
my $comment_codes = $self->getDescriptions("commentcodes");

my $id = $self->createDiscussion( {
title => $story->{title},
section => $story->{section},
topic => $story->{tid},
url => "$rootdir/article.pl?sid=$story->{sid}&tid=$story->{topic}",
sid => $story->{sid},
commentstatus => $story->{commentstatus} || 'enabled',
commentstatus => $comment_codes->{$story->{commentstatus}} ? $story->{commentstatus} : getCurrentStatic('defaultcommentstatus'),
ts => $story->{'time'}
});
unless ($id) {
Expand Down Expand Up @@ -5345,14 +5346,16 @@ sub updateStory {
print STDERR "Failed to set topics for story\n";
goto error;
}

my $comment_codes = $self->getDescriptions("commentcodes");
my $dis_data = {
sid => $sid,
title => $data->{title},
section => $data->{section},
url => "$constants->{rootdir}/article.pl?sid=$sid",
ts => $data->{'time'},
topic => $data->{tid},
commentstatus => $data->{commentstatus}
commentstatus => $comment_codes->{$data->{commentstatus}} ? $data->{commentstatus} : getCurrentStatic('defaultcommentstatus'),
};
unless ($self->setStoryTopics($sid, createStoryTopicData($self))) {
print STDERR "Failed to set topics for story\n";
Expand Down
2 changes: 2 additions & 0 deletions plugins/Admin/admin.pl
Expand Up @@ -1628,6 +1628,7 @@ sub updateStory {
dept => $form->{dept},
'time' => $time,
displaystatus => $form->{displaystatus},
commentstatus => $form->{commentstatus},
writestatus => $form->{writestatus},
bodytext => $form->{bodytext},
introtext => $form->{introtext},
Expand Down Expand Up @@ -1818,6 +1819,7 @@ sub saveStory {
relatedtext => $form->{relatedtext},
subid => $form->{subid},
subsection => $form->{subsection},
commentstatus => $form->{commentstatus},
};
my $extras = $slashdb->getSectionExtras($data->{section});
if ($extras && @$extras) {
Expand Down

0 comments on commit 5377ac7

Please sign in to comment.