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
7525f463
Commit
7525f463
authored
Jan 22, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added machinery to handle broken objects
parent
1c3ac2be
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
7 deletions
+40
-7
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+6
-2
lib/python/OFS/ObjectManager.py
lib/python/OFS/ObjectManager.py
+34
-5
lib/python/OFS/www/broken.gif
lib/python/OFS/www/broken.gif
+0
-0
No files found.
lib/python/OFS/Application.py
View file @
7525f463
...
...
@@ -11,8 +11,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.4
0 1998/01/16 16:02:32 brian
Exp $'''
__version__
=
'$Revision: 1.4
0
$'
[
11
:
-
2
]
$Id: Application.py,v 1.4
1 1998/01/22 00:15:00 jim
Exp $'''
__version__
=
'$Revision: 1.4
1
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
...
...
@@ -41,6 +41,7 @@ class Application(Folder.Folder):
image
=
ImageFile
(
'www/Image_icon.gif'
,
globals
())
file
=
ImageFile
(
'www/File_icon.gif'
,
globals
())
doc
=
ImageFile
(
'www/Document_icon.gif'
,
globals
())
broken
=
ImageFile
(
'www/broken.gif'
,
globals
())
UserFolder
=
ImageFile
(
'AccessControl/www/UserFolder_icon.gif'
)
User_icon
=
ImageFile
(
'AccessControl/www/User_icon.gif'
)
...
...
@@ -257,6 +258,9 @@ class Misc_:
##############################################################################
#
# $Log: Application.py,v $
# Revision 1.41 1998/01/22 00:15:00 jim
# Added machinery to handle broken objects
#
# Revision 1.40 1998/01/16 16:02:32 brian
# Fixed bug: install_products only recognized __init__.py files, not .pycs
#
...
...
lib/python/OFS/ObjectManager.py
View file @
7525f463
__doc__
=
"""Object Manager
$Id: ObjectManager.py,v 1.3
1 1998/01/08 17:40:42
jim Exp $"""
$Id: ObjectManager.py,v 1.3
2 1998/01/22 00:15:01
jim Exp $"""
__version__
=
'$Revision: 1.3
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
2
$'
[
11
:
-
2
]
import
Persistence
,
App
.
Management
,
Acquisition
,
App
.
Undo
import
Persistence
,
App
.
Management
,
Acquisition
,
App
.
Undo
,
sys
from
Globals
import
HTMLFile
,
HTMLFile
from
Globals
import
MessageDialog
,
default__class_init__
from
string
import
find
,
join
,
lower
...
...
@@ -126,6 +126,27 @@ class ObjectManager(
return
filter
(
None
,
map
(
lambda
x
,
v
=
t
,
s
=
self
:
(
x
[
'meta_type'
]
in
v
)
and
getattr
(
s
,
x
[
'id'
])
or
None
,
self
.
_objects
))
r
=
[]
for
i
in
self
.
_objects
:
c
=
'Unknown class'
oid
=
'Unknown id'
id
=
i
[
'id'
]
try
:
o
=
getattr
(
self
,
id
)
oid
=
o
.
_p_oid
c
=
o
.
__class__
.
__name__
o
.
id
except
:
o
=
Broken
(
id
,
"<strong>Broken</strong>: %s: %s
\
n
class=%s, id=%s"
%
(
sys
.
exc_type
,
sys
.
exc_value
,
c
,
oid
))
r
.
append
(
o
)
return
r
return
map
(
lambda
i
,
s
=
self
:
getattr
(
s
,
i
[
'id'
]),
self
.
_objects
)
def
objectItems
(
self
,
t
=
None
):
...
...
@@ -453,13 +474,21 @@ class ObjectManager(
try
:
jar
.
db
[
self
.
_p_oid
]
except
:
return
0
return
1
class
Broken
:
icon
=
'p_/broken'
modified_in_session
=
0
def
__init__
(
self
,
id
,
title
):
self
.
id
=
id
self
.
title
=
title
##############################################################################
#
# $Log: ObjectManager.py,v $
# Revision 1.32 1998/01/22 00:15:01 jim
# Added machinery to handle broken objects
#
# Revision 1.31 1998/01/08 17:40:42 jim
# Modified __class_init__ to use default class init defined in Globals.
#
...
...
lib/python/OFS/www/broken.gif
0 → 100755
View file @
7525f463
894 Bytes
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