svnno****@sourc*****
svnno****@sourc*****
2008年 9月 24日 (水) 18:54:22 JST
Revision: 767 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=767 Author: tach Date: 2008-09-24 18:54:22 +0900 (Wed, 24 Sep 2008) Log Message: ----------- * Fix condition and sql error * Add "readmore" link to mainpage box Modified Paths: -------------- slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl 2008-09-24 04:21:58 UTC (rev 766) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal_update_slashbox.pl 2008-09-24 09:54:22 UTC (rev 767) @@ -24,13 +24,13 @@ foreach my $skin (values(%$skins)) { my $name = "$skin->{name}$block_suffix"; my $block = $slashdb->getBlock($name); - unless ($block) { + unless ($block->{bid}) { slashdLog("Could not get block \"$name\", skipped"); next; } my $tids = [ $slashdb->getAllChildrenTids($skin->{nexus}) ]; my $where = '1=1'; - $where .= 'AND tid IN ('.join(',', @$tids).')' if ($skin->{skid} != $constants->{mainpage_skid}); + $where .= ' AND tid IN ('.join(',', @$tids).')' if ($skin->{skid} != $constants->{mainpage_skid}); next if ($slashdb->sqlCount('journals', $where . ($force ? '' : "AND date > '$block->{last_update}'")) < 1); slashdLog("Start updating block \"$name\"") if (verbosity() >= 3); @@ -47,6 +47,12 @@ $str .= slashDisplay('topjournals', { 'item' => $item }, { Return => 1, Nocomm => 1, Page => 'portald' }); } $str .= "\n</ul>"; + if ($skin->{skid} == $constants->{mainpage_skid}) { + my $morestr = getData('journal_slashbox_more', { + 'link' => "$constants->{absolutedir}/journals/top/recent/?start=$limit", + }, 'journal'); + $str .= $morestr if ($morestr); + } $slashdb->setBlock($name, { block => $str }); slashdLog("Updated block \"$name\"") if (verbosity() >= 2);