svnno****@sourc*****
svnno****@sourc*****
2008年 2月 26日 (火) 20:58:41 JST
Revision: 523 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=523 Author: tach Date: 2008-02-26 20:58:41 +0900 (Tue, 26 Feb 2008) Log Message: ----------- Fix to show stories that should display (merged from 2.5.0.192 branch) Modified Paths: -------------- slashjp/trunk/debian/changelog slashjp/trunk/plugins/Admin/admin.pl -------------- next part -------------- Modified: slashjp/trunk/debian/changelog =================================================================== --- slashjp/trunk/debian/changelog 2008-02-26 11:34:31 UTC (rev 522) +++ slashjp/trunk/debian/changelog 2008-02-26 11:58:41 UTC (rev 523) @@ -1,9 +1,10 @@ slash (2.5.0.195-1) unstable; urgency=low * New upstream CVS release - * 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 10:37:23 +0000 + -- Taku YASUI <tach****@osdn*****> Tue, 26 Feb 2008 11:54:28 +0000 slash (2.5.0.192-4) unstable; urgency=low Modified: slashjp/trunk/plugins/Admin/admin.pl =================================================================== --- slashjp/trunk/plugins/Admin/admin.pl 2008-02-26 11:34:31 UTC (rev 522) +++ slashjp/trunk/plugins/Admin/admin.pl 2008-02-26 11:58:41 UTC (rev 523) @@ -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";