kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-07-28 02:01 pm

[dw-free] Reading list summary doesn't show a number when there's 0

[commit: http://hg.dwscoalition.org/dw-free/rev/348b89a55eb4]

http://bugs.dwscoalition.org/show_bug.cgi?id=1497

Make sure we reference numeric values.

Patch by [personal profile] kareila.

Files modified:
  • cgi-bin/DW/Widget/ReadingList.pm
--------------------------------------------------------------------------------
diff -r 8614f9d218b5 -r 348b89a55eb4 cgi-bin/DW/Widget/ReadingList.pm
--- a/cgi-bin/DW/Widget/ReadingList.pm	Tue Jul 28 05:28:15 2009 +0000
+++ b/cgi-bin/DW/Widget/ReadingList.pm	Tue Jul 28 09:00:51 2009 -0500
@@ -32,9 +32,9 @@ sub render_body {
     my $ret = "<h2>" . $class->ml( 'widget.readinglist.title' ) . "</h2>";
     $ret .= "<p>" . $class->ml( 'widget.readinglist.readpage', { aopts => "href='" . $remote->journal_base. "/read'" } ) . "</p>";
     $ret .= "<p>" . $class->ml( 'widget.readinglist.breakdown.header' ) . "</p>";
-    $ret .= "<ul><li>" . $class->ml( 'widget.readinglist.breakdown.personal', { num => $count{personal} } ) . "</li>";
-    $ret .= "<li>" . $class->ml( 'widget.readinglist.breakdown.communities', { num => $count{community} } ) . "</li>";
-    $ret .= "<li>" . $class->ml( 'widget.readinglist.breakdown.feeds', { num => $count{syndicated} } ) . "</li></ul>";
+    $ret .= "<ul><li>" . $class->ml( 'widget.readinglist.breakdown.personal', { num => $count{personal} + 0 } ) . "</li>";
+    $ret .= "<li>" . $class->ml( 'widget.readinglist.breakdown.communities', { num => $count{community} + 0 } ) . "</li>";
+    $ret .= "<li>" . $class->ml( 'widget.readinglist.breakdown.feeds', { num => $count{syndicated} + 0 } ) . "</li></ul>";
 
     return $ret;
 }
--------------------------------------------------------------------------------

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org