示例#1
0
 def __init__(self, id, title=''):
     # BBB To be removed in Plone 3.5
     log_deprecated("LargePloneFolder is deprecated and will be removed in "
                    "Plone 3.5. Please use ATBTreeFolder from ATCT instead.")
     BTreeFolder2Base.__init__(self, id)
     BasePloneFolder.__init__(self, id, title)
     self.id=id
     self.title=title
示例#2
0
 def getPILVersion(self):
     """The version of the installed Python Imaging Library."""
     log_deprecated("getPILVersion is deprecated and will be removed in "
                    "Plone 3.5. Please use coreVersions instead.")
     try:
         from PIL.Image import VERSION
     except ImportError:
         VERSION = None
     return VERSION
 def getNumberOfComments(self):
     """Returns the number of comments to this forum."""
     log_deprecated(
         "Products.Ploneboard.content.PloneboardForum."
         "PloneboardForum.getNumberOfComments is deprecated in favor of "
         "Products.Ploneboard.browser.forum.ForumView.getNumberOfComments")
     return len(self._get_catalog()(
         object_provides='Products.Ploneboard.interfaces.IComment',
         path='/'.join(self.getPhysicalPath())))
 def getNumberOfConversations(self):
     """Returns the number of conversations in this forum."""
     log_deprecated("Products.Ploneboard.content.PloneboardForum."
                    "PloneboardForum.getNumberOfConversations is "
                    "deprecated in favor of Products.Ploneboard.browser."
                    "forum.ForumView.getNumberOfConversations")
     return len(self._get_catalog()(
         object_provides=IConversation.__identifier__,
         path='/'.join(self.getPhysicalPath())))
 def getConversations(self, limit=20, offset=0):
     """Returns conversations."""
     log_deprecated("Products.Ploneboard.content.PloneboardForum.PloneboardForum.getConversations is deprecated in favor of Products.Ploneboard.browser.forum.ForumView.getConversations")
     catalog = self.getCatalog()
     return [f.getObject() for f in \
             catalog(object_provides=IConversation.__identifier__,
                     sort_on='modified',
                     sort_order='reverse',
                     sort_limit=(offset+limit),
                     path='/'.join(self.getPhysicalPath()))[offset:offset+limit]]
 def getNumberOfComments(self):
     """Returns the number of comments to this forum."""
     log_deprecated(
         "Products.Ploneboard.content.PloneboardForum."
         "PloneboardForum.getNumberOfComments is deprecated in favor of "
         "Products.Ploneboard.browser.forum.ForumView.getNumberOfComments"
     )
     return len(self._get_catalog()(
         object_provides='Products.Ploneboard.interfaces.IComment',
         path='/'.join(self.getPhysicalPath())))
示例#7
0
 def getConversations(self, limit=20, offset=0):
     """Returns conversations."""
     log_deprecated("Products.Ploneboard.content.PloneboardForum.PloneboardForum.getConversations is deprecated in favor of Products.Ploneboard.browser.forum.ForumView.getConversations")
     catalog = self.getCatalog()
     return [f.getObject() for f in \
             catalog(object_provides=IConversation.__identifier__,
                     sort_on='modified',
                     sort_order='reverse',
                     sort_limit=(offset+limit),
                     path='/'.join(self.getPhysicalPath()))[offset:offset+limit]]
示例#8
0
def addLargePloneFolder(self, id, title='', description='', REQUEST=None):
    """ add a BTree-backed Plone Folder """
    # BBB To be removed in Plone 3.5
    log_deprecated("LargePloneFolder is deprecated and will be removed in "
                   "Plone 3.5. Please use ATBTreeFolder from ATCT instead.")

    obj = LargePloneFolder(id, title=title)
    obj.setDescription(description)
    self._setObject(id, obj)
    if REQUEST is not None:
        REQUEST['RESPONSE'].redirect( self.absolute_url() + '/manage_main' )
 def getNumberOfConversations(self):
     """Returns the number of conversations in this forum."""
     log_deprecated("Products.Ploneboard.content.PloneboardForum."
                    "PloneboardForum.getNumberOfConversations is "
                    "deprecated in favor of Products.Ploneboard.browser."
                    "forum.ForumView.getNumberOfConversations")
     return len(
         self._get_catalog()(
             object_provides=IConversation.__identifier__,
             path='/'.join(self.getPhysicalPath())
         )
     )