def _data(self):
     try:
         #print "Calculating recent users... %s" % time()
         strpath = "/".join(self.context.getPhysicalPath())
         rootid = contentroot_details['id']
         objRoot = getattr(self.portal, rootid)
         if self.context == objRoot:
             strpath = "/".join(self.portal.getPhysicalPath())
         else:
             strpath = "/".join(self.context.getPhysicalPath())
     except AttributeError:
         strpath = "/".join(self.context.getPhysicalPath())
     return getRecentlyActiveMembers(self.context, strpath, self.data.count)
Ejemplo n.º 2
0
 def _data(self):        
     from statistics import getRecentlyActiveMembers
     strpath = "/".join(self.context.getPhysicalPath())
     try:
         from ubify.policy.config import contentroot_details
         rootid = contentroot_details['id']                
         objRoot = getattr(self.portal,rootid)
         if self.context == objRoot:
             strpath = "/".join(self.portal.getPhysicalPath())                
         else:
             strpath = "/".join(self.context.getPhysicalPath())                
     except AttributeError:
         strpath = "/".join(self.context.getPhysicalPath())
         
     try:
         return getRecentlyActiveMembers(self.context,strpath)
     except AttributeError:
         pass