svnno****@sourc*****
svnno****@sourc*****
2008年 2月 26日 (火) 20:15:23 JST
Revision: 521 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=521 Author: tach Date: 2008-02-26 20:15:23 +0900 (Tue, 26 Feb 2008) Log Message: ----------- Fix to show stories that should display Modified Paths: -------------- slashjp/branches/2.5.0.192/debian/changelog slashjp/branches/2.5.0.192/plugins/Admin/admin.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/debian/changelog =================================================================== --- slashjp/branches/2.5.0.192/debian/changelog 2008-02-26 11:09:15 UTC (rev 520) +++ slashjp/branches/2.5.0.192/debian/changelog 2008-02-26 11:15:23 UTC (rev 521) @@ -1,8 +1,9 @@ slash (2.5.0.192-5) unstable; urgency=low - * Fix adimin topic select window to change tree/alpabetical + * Fix admin topic select window to change tree/alpabetical + * Fix to show stories that should display - -- Taku YASUI <tach****@osdn*****> Tue, 26 Feb 2008 20:08:20 +0900 + -- Taku YASUI <tach****@osdn*****> Tue, 26 Feb 2008 20:13:25 +0900 slash (2.5.0.192-4) unstable; urgency=low Modified: slashjp/branches/2.5.0.192/plugins/Admin/admin.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Admin/admin.pl 2008-02-26 11:09:15 UTC (rev 520) +++ slashjp/branches/2.5.0.192/plugins/Admin/admin.pl 2008-02-26 11:15:23 UTC (rev 521) @@ -2066,6 +2066,31 @@ $data->{neverdisplay} = $form->{display} ? '' : 1; + # If brief_sectional_mainpage is set, and this story has only + # nexuses in getMainpageDisplayableNexuses(), all below + # the sectional weight, and not the mainpage nexus itself, + # then the current getStoriesEssentials code will pick up + # this story (for one-liner display) even though we don't + # want it picked up. The kludge is to mark the story, in + # that case, as 'offmainpage'. - Jamie 2008-01-28 + $data->{offmainpage} = 0 if ($story->{offmainpage}); + if ($constants->{brief_sectional_mainpage}) { + my $sectional_weight = $constants->{topics_sectional_weight} || 10; + my $rendered_hr = $slashdb->renderTopics($chosen_hr); + if (!$rendered_hr->{ $constants->{mainpage_nexus_tid} }) { + my $mdn_ar = $slashdb->getMainpageDisplayableNexuses(); + my $mdn_hr = { map { ($_, 1) } @$mdn_ar }; + my $any_sectional = 0; + for my $tid (keys %$rendered_hr) { + $any_sectional = 1, last + if $rendered_hr->{$tid} >= $sectional_weight + && $mdn_hr->{$tid}; + } + $data->{offmainpage} = 1 if !$any_sectional; + } + + } + #print STDERR "admin.pl before updateStory data: " . Dumper($data); # if ($data->{neverdisplay}) { # print STDERR "Setting sid: $form->{sid} to neverdisplay\n";