svnno****@sourc*****
svnno****@sourc*****
2008年 6月 26日 (木) 19:19:47 JST
Revision: 677 http://svn.sourceforge.jp/cgi-bin/viewcvs.cgi?root=slashdotjp&view=rev&rev=677 Author: tach Date: 2008-06-26 19:19:47 +0900 (Thu, 26 Jun 2008) Log Message: ----------- fix for pagination (cont.) Modified Paths: -------------- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl -------------- next part -------------- Modified: slashjp/branches/2.5.0.192/plugins/Journal/journal.pl =================================================================== --- slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 09:46:05 UTC (rev 676) +++ slashjp/branches/2.5.0.192/plugins/Journal/journal.pl 2008-06-26 10:19:47 UTC (rev 677) @@ -121,19 +121,29 @@ _printHead('mainhead') or return; my $start = $form->{start} || 0; + my $limit = $user->{mobile} ? $constants->{mobile_top_journal_count} || 10 + : $constants->{'journal_top'} || 10; # this should probably be in a separate template, so the site admins # can select the order themselves -- pudge if ($constants->{journal_top_recent} && $form->{op} =~ /^top(_recent)?$/) { - $journals = $user->{mobile} ? $journal_reader->topRecent($constants->{mobile_top_journal_count} || 10, $start) - : $journal_reader->topRecent; - slashDisplay('journaltop', { journals => $journals, type => 'recent' }); + $journals = $journal_reader->topRecent($limit, $start); + slashDisplay('journaltop', { + journals => $journals, + type => 'recent', + start => $start, + limit => $limit, + }); } if ($constants->{journal_top_posters} && $form->{op} =~ /^top(_posters)?$/) { - $journals = $user->{mobile} ? $journal_reader->top($constants->{mobile_top_journal_count} || 10, $start) - : $journal_reader->top; - slashDisplay('journaltop', { journals => $journals, type => 'top' }); + $journals = $journal_reader->top($limit, $start); + slashDisplay('journaltop', { + journals => $journals, + type => 'top', + start => $start, + limit => $limit, + }); } if ($constants->{journal_top_friend} && $form->{op} =~ /^top(_friend)?$/) {