[ljcom] r12061: LJSUP-12426: Implement API to get histor...
Committer: vtroitsky
LJSUP-12426: Implement API to get history data for scroller. Initial case with wrong parameters.U trunk/cgi-bin/LJ/Pay/SelfPromo.pm
Modified: trunk/cgi-bin/LJ/Pay/SelfPromo.pm
===================================================================
--- trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-06-05 08:02:23 UTC (rev 12060)
+++ trunk/cgi-bin/LJ/Pay/SelfPromo.pm 2012-06-05 08:39:42 UTC (rev 12061)
@@ -737,7 +737,9 @@
$count = $index * (-1) if ($index + $count >= 0);
-warn "index: $index, count: $count";
+#warn "index: $index, count: $count";
+
+ return [] if ($index == 0 && $count == 0);
my $codirection = $index*$count >=0 ? 1 : 0;
my $offset = $codirection ? abs($index) : abs ($index + $count);
my $limit = abs($count);
