Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
b5f0baec
Commit
b5f0baec
authored
Feb 13, 2002
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #166: ObjectManger.all_meta_types() implemented only
an incomplete filter based on interfaces.
parent
2722e047
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
6 deletions
+26
-6
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+23
-6
No files found.
doc/CHANGES.txt
View file @
b5f0baec
...
...
@@ -16,6 +16,9 @@ Zope Changes
- Collector #210: HTML() function of StructuredText produced wrong
<h0> tags.
- Collector #166: ObjectManger.all_meta_types() implemented only
an incomplete filter based on interfaces.
Zope 2.5.1 beta 1
Bugs Fixed
...
...
lib/python/OFS/ObjectManager.py
View file @
b5f0baec
...
...
@@ -12,9 +12,9 @@
##############################################################################
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.14
6 2002/02/07 17:20:59
andreasjung Exp $"""
$Id: ObjectManager.py,v 1.14
7 2002/02/13 15:27:48
andreasjung Exp $"""
__version__
=
'$Revision: 1.14
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.14
7
$'
[
11
:
-
2
]
import
App.Management
,
Acquisition
,
Globals
,
CopySupport
,
Products
import
os
,
App
.
FactoryDispatcher
,
re
,
Products
...
...
@@ -150,11 +150,28 @@ class ObjectManager(
default__class_init__
(
self
)
def
all_meta_types
(
self
,
interfaces
=
None
):
pmt
=
()
if
hasattr
(
self
,
'_product_meta_types'
):
pmt
=
self
.
_product_meta_types
_
pmt
=
()
if
hasattr
(
self
,
'_product_meta_types'
):
_
pmt
=
self
.
_product_meta_types
elif
hasattr
(
self
,
'aq_acquire'
):
try
:
pmt
=
self
.
aq_acquire
(
'_product_meta_types'
)
try
:
_
pmt
=
self
.
aq_acquire
(
'_product_meta_types'
)
except
:
pass
if
interfaces
is
None
:
pmt
=
list
(
_pmt
)
else
:
pmt
=
[]
for
entry
in
pmt
:
try
:
eil
=
entry
.
get
(
'interfaces'
,
None
)
if
eil
is
not
None
:
for
ei
in
eil
:
for
i
in
interfaces
:
if
ei
is
i
or
ei
.
extends
(
i
):
pmt
.
append
(
entry
)
raise
BreakoutException
# only append 1ce
except
BreakoutException
:
pass
gmt
=
[]
...
...
@@ -175,7 +192,7 @@ class ObjectManager(
except
BreakoutException
:
pass
return
list
(
self
.
meta_types
)
+
gmt
+
list
(
pmt
)
return
list
(
self
.
meta_types
)
+
gmt
+
pmt
def
_subobject_permissions
(
self
):
return
(
Products
.
__ac_permissions__
+
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment