Skip to content

Commit

Permalink
Rendered topics that match no nexuses now count as primaryskid 0,
Browse files Browse the repository at this point in the history
not the mainpage nexus.
  • Loading branch information
jamiemccarthy committed Jun 23, 2004
1 parent abef0df commit 660060f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Slash/DB/MySQL/MySQL.pm
Expand Up @@ -8364,7 +8364,7 @@ sub setStoryRenderedFromChosen {
{ stoid => $stoid, tid => $key, weight => $rendered_hr->{$key} }
)) {
# and we should ROLLBACK here
return 0;
return undef;
}
}

Expand All @@ -8379,6 +8379,10 @@ sub getPrimarySkidFromRendered {
# Eliminate any nexuses not in this set of rendered topics.
@nexuses = grep { $rendered_hr->{$_} } @nexuses;

# No rendered nexuses, none at all, means primaryskid 0,
# which means "none".
return 0 if !@nexuses;

# Eliminate the mainpage's nexus.
my $mp_skid = getCurrentStatic("mainpage_skid");
my $mp_nexus = $self->getNexusFromSkid($mp_skid);
Expand Down

0 comments on commit 660060f

Please sign in to comment.