File: SimplePatch.py

package info (click to toggle)
zope-replacesupport 1.0.2-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 168 kB
  • ctags: 155
  • sloc: python: 743; makefile: 38; sh: 25
file content (38 lines) | stat: -rw-r--r-- 1,269 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# ReplaceSupport 1.0.2
# (c) 2000-2004, Stefan H. Holek, stefan@epy.co.at
# http://zope.org/Members/shh/ReplaceSupport
# License: ZPL
# Zope: 2.3-2.7

__doc__ = 'Add a Replace tab to Folders'
__version__ = '1.0.2'

__refresh_module__ = 0

try:

    from Globals import default__class_init__
    from OFS.Folder import Folder
    from ReplaceSupport import ReplaceSupport

    Folder.__ac_permissions__ = Folder.__ac_permissions__ + ReplaceSupport.__ac_permissions__
    Folder.manage_options = Folder.manage_options + ReplaceSupport.manage_options
    Folder.manage_replaceForm = ReplaceSupport.manage_replaceForm
    Folder.manage_replaceResult = ReplaceSupport.manage_replaceResult 
    Folder.ZopeReplace = ReplaceSupport.ZopeReplace
    Folder.PrincipiaReplace = ReplaceSupport.ZopeReplace
    Folder._ZopeReplace = ReplaceSupport._ZopeReplace
    Folder._PrincipiaReplace = ReplaceSupport._ZopeReplace
    Folder._ReplaceHandlerRegistry = ReplaceSupport._ReplaceHandlerRegistry
    Folder.getReplaceHandlerMetaTypes = ReplaceSupport.getReplaceHandlerMetaTypes
    
    default__class_init__(Folder)

    from zLOG import LOG, INFO
    LOG('ReplaceSupport', INFO, 'Applied patch version %s.' % __version__)

except:

    import traceback
    traceback.print_exc()