Permalink
Browse files

Fix max_cid check (can be 0!)

  • Loading branch information...
1 parent 6fecb37 commit a9e1861929c2895a660018ea7bb01d9a37a3f685 @pudge pudge committed Aug 8, 2007
Showing with 2 additions and 2 deletions.
  1. +2 −2 plugins/Ajax/htdocs/ajax.pl
@@ -293,7 +293,7 @@ sub fetchComments {
$user->{state}{ajax_accesslog_op} = "ajax_comments_fetch";
#use Data::Dumper; print STDERR Dumper [ $cids, $id, $cid, $max_cid ];
# XXX error?
- return unless $id && ($max_cid || @$cids);
+ return unless $id && (defined($max_cid) || @$cids);
my $discussion = $slashdb->getDiscussion($id);
if ($discussion->{type} eq 'archived') {
@@ -316,7 +316,7 @@ sub fetchComments {
return unless $comments && keys %$comments;
my %data;
- if ($max_cid) {
+ if (defined($max_cid)) {
$cids = [ map { $_->[0] }
@{$slashdb->sqlSelectAll(
'cid', 'comments',

0 comments on commit a9e1861

Please sign in to comment.