liquid_feedback_frontend

changeset 1075:a85f7ea61ef6

Fixed error until first run of lf_update
author bsw
date Tue Jul 22 22:23:01 2014 +0200 (2014-07-22)
parents aefef1556d55
children b298a0534642
files app/main/index/_sidebar_members.lua model/member_count.lua
line diff
     1.1 --- a/app/main/index/_sidebar_members.lua	Tue Jul 22 22:17:37 2014 +0200
     1.2 +++ b/app/main/index/_sidebar_members.lua	Tue Jul 22 22:23:01 2014 +0200
     1.3 @@ -2,8 +2,13 @@
     1.4    return
     1.5  end
     1.6  
     1.7 +local member_count = MemberCount:get()
     1.8 +
     1.9 +if not member_count then
    1.10 +  return
    1.11 +end
    1.12 +
    1.13  ui.sidebar ( "tab-members", function ()
    1.14 -  local member_count = MemberCount:get()
    1.15    ui.sidebarHead( function()
    1.16      ui.heading {
    1.17        level = 2,
     2.1 --- a/model/member_count.lua	Tue Jul 22 22:17:37 2014 +0200
     2.2 +++ b/model/member_count.lua	Tue Jul 22 22:23:01 2014 +0200
     2.3 @@ -3,7 +3,10 @@
     2.4  
     2.5  function MemberCount:get()
     2.6    if not MemberCount.total_count then
     2.7 -    MemberCount.total_count = self:new_selector():single_object_mode():exec().total_count
     2.8 +    local member_count = self:new_selector():optional_object_mode():exec()
     2.9 +    if member_count then
    2.10 +      MemberCount.total_count = member_count.total_count
    2.11 +    end
    2.12    end
    2.13    return MemberCount.total_count
    2.14  end
    2.15 \ No newline at end of file

Impressum / About Us