Delicious sidebar oops

Currently the “group by date” setting in the delicious sidebar does
not seem to have any effect: it’s always on.

I think the reason is that the value in @sb_config[‘groupdate’]
evaluates to “0” or “1”, both strings and hence both true according
to Ruby (any Perl programmers out there want to own up to this one? :).

I guess a proper fix would be to map this setting to a boolean, but I
don’t know much about how sidebars are configured, so I’ve got a bit
of a brute force fix instead, comments appreciated.

typo $ svn diff components/plugins/sidebars/delicious/content.rhtml
Index: components/plugins/sidebars/delicious/content.rhtml

— components/plugins/sidebars/delicious/content.rhtml (revision 1193)
+++ components/plugins/sidebars/delicious/content.rhtml (working copy)
@@ -1,8 +1,8 @@
<% if @delicious -%>


<%=h
@delicious.title %>

  • <% (@sb_config[‘groupdate’] ? @delicious.days : [{ :container =>
    @delicious.items }]).each do |group| -%>
  • <% if @sb_config[‘groupdate’] -%>
  • <% (@sb_config[‘groupdate’] != “0” ? @delicious.days :
    [{ :container => @delicious.items }]).each do |group| -%>
  • <% if @sb_config[‘groupdate’] != “0” -%>
    <%=h group[:date].to_s.to_date.strftime("%b %
    d") %>

    <% end -%>

    This is a known half-fixed bug in the trunk, post 4.0.0. Before the
    half-fix, it was impossible to disable checkboxes that defaulted to
    true. So we’re making some progress, but we aren’t there yet.

    It’s easy to fix, but finding a clean fix is proving difficult. Plus,
    everyone’s been on vacation lately. We’ll get it fixed and release
    4.0.1 later this week.

    Scott