from zLOG import LOG, INFO, BLATHER
# BBB: CMF < 1.5
try:
    from Products.CMFCore.permissions import AddPortalContent
except ImportError:
    from Products.CMFCore.CMFCorePermissions import AddPortalContent

GLOBALS = globals()

ADD_CONTENT_PERMISSION = AddPortalContent
PROJECT_NAME = 'CacheSetup'
SKINS_DIR = 'skins'
CACHE_TOOL_ID = 'portal_cache_settings'
PAGE_CACHE_MANAGER_ID = 'CacheSetup_PageCache'
OFS_CACHE_ID = 'CacheSetup_OFSCache'
RR_CACHE_ID = 'CacheSetup_ResourceRegistryCache'

# TODO: remove this log() method
def log(msg, level=BLATHER):
    LOG(PROJECT_NAME, level, msg)

from Products.CMFPlone.utils import getFSVersionTuple
_ploneVersion = getFSVersionTuple()
_major = _ploneVersion[0]
_minor = _ploneVersion[1]
if (_major == 2) and (_minor == 5):
    PLONE25 = True
else:
    PLONE25 = False
