-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Made CMFBTreeFolder compatible with CMF 1.5
- Loading branch information
0 parents
commit 43cf6c9
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Version 1.0.2 | ||
|
||
- Made CMFBTreeFolder compatible with CMF 1.5+ | ||
|
||
Version 1.0.1 | ||
|
||
- ConflictError was swallowed by _delObject. This could break code | ||
expecting to do cleanups before deletion. | ||
|
||
- Renamed hasObject() to has_key(). hasObject() conflicted with | ||
another product. | ||
|
||
- You can now visit objects whose names have a trailing space. | ||
|
||
Version 1.0 | ||
|
||
- BTreeFolder2s now use an icon contributed by Chris Withers. | ||
|
||
- Since recent ZODB releases have caused minor corruption in BTrees, | ||
there is now a manage_cleanup method for fixing damaged BTrees | ||
contained in BTreeFolders. | ||
|
||
Version 0.5.1 | ||
|
||
- Fixed the CMFBTreeFolder constructor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
############################################################################## | ||
# | ||
# Copyright (c) 2001, 2002 Zope Corporation and Contributors. | ||
# All Rights Reserved. | ||
# | ||
# This software is subject to the provisions of the Zope Public License, | ||
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution. | ||
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
# FOR A PARTICULAR PURPOSE | ||
# | ||
############################################################################## | ||
"""CMFBTreeFolder | ||
$Id: CMFBTreeFolder.py,v 1.2 2002/10/30 14:54:18 shane Exp $ | ||
""" | ||
|
||
import Globals | ||
from BTreeFolder2 import BTreeFolder2Base | ||
try: | ||
from Products.CMFCore.PortalFolder import PortalFolderBase as PortalFolder | ||
except ImportError: | ||
from Products.CMFCore.PortalFolder import PortalFolder | ||
import Products.CMFCore.PortalFolder | ||
|
||
|
||
_actions = Products.CMFCore.PortalFolder.factory_type_information[0]['actions'] | ||
|
||
factory_type_information = ( { 'id' : 'CMF BTree Folder', | ||
'meta_type' : 'CMF BTree Folder', | ||
'description' : """\ | ||
CMF folder designed to hold a lot of objects.""", | ||
'icon' : 'folder_icon.gif', | ||
'product' : 'BTreeFolder2', | ||
'factory' : 'manage_addCMFBTreeFolder', | ||
'filter_content_types' : 0, | ||
'immediate_view' : 'folder_edit_form', | ||
'actions' : _actions, | ||
}, | ||
) | ||
|
||
|
||
def manage_addCMFBTreeFolder(dispatcher, id, title='', REQUEST=None): | ||
"""Adds a new BTreeFolder object with id *id*. | ||
""" | ||
id = str(id) | ||
ob = CMFBTreeFolder(id) | ||
ob.title = str(title) | ||
dispatcher._setObject(id, ob) | ||
ob = dispatcher._getOb(id) | ||
if REQUEST is not None: | ||
REQUEST['RESPONSE'].redirect(ob.absolute_url() + '/manage_main' ) | ||
|
||
|
||
class CMFBTreeFolder(BTreeFolder2Base, PortalFolder): | ||
"""BTree folder for CMF sites. | ||
""" | ||
meta_type = 'CMF BTree Folder' | ||
|
||
def __init__(self, id, title=''): | ||
PortalFolder.__init__(self, id, title) | ||
BTreeFolder2Base.__init__(self, id) | ||
|
||
def _checkId(self, id, allow_dup=0): | ||
PortalFolder._checkId(self, id, allow_dup) | ||
BTreeFolder2Base._checkId(self, id, allow_dup) | ||
|
||
|
||
Globals.InitializeClass(CMFBTreeFolder) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
BTreeFolder2-1.0.2 |