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
9776cfc7
Commit
9776cfc7
authored
Apr 01, 2005
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed BoboPOS compatibility code.
parent
b427bb74
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
20 deletions
+5
-20
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+3
-5
lib/python/ZClasses/Basic.py
lib/python/ZClasses/Basic.py
+1
-1
lib/python/ZClasses/ZClass.py
lib/python/ZClasses/ZClass.py
+1
-12
lib/python/Zope2/App/startup.py
lib/python/Zope2/App/startup.py
+0
-2
No files found.
lib/python/App/ApplicationManager.py
View file @
9776cfc7
...
...
@@ -376,11 +376,9 @@ class ApplicationManager(Folder,CacheManager):
return
self
.
_p_jar
.
db
().
getName
()
def
db_size
(
self
):
if
Globals
.
DatabaseVersion
==
'2'
:
s
=
os
.
stat
(
self
.
db_name
())[
6
]
else
:
s
=
self
.
_p_jar
.
db
().
getSize
()
if
type
(
s
)
is
type
(
''
):
return
s
if
type
(
s
)
is
type
(
''
):
return
s
if
s
>=
1048576.0
:
return
'%.1fM'
%
(
s
/
1048576.0
)
return
'%.1fK'
%
(
s
/
1024.0
)
...
...
lib/python/ZClasses/Basic.py
View file @
9776cfc7
...
...
@@ -64,7 +64,7 @@ class ZClassBasicSheet(OFS.PropertySheets.PropertySheet,
def
classIcon
(
self
):
return
self
.
getClassAttr
(
'icon'
,
''
)
def
show_class_id
(
self
):
return
Globals
.
DatabaseVersion
==
'3'
def
show_class_id
(
self
):
return
True
def
class_id
(
self
):
return
(
self
.
getClassAttr
(
'__module__'
,
''
)
or
''
)[
1
:]
...
...
lib/python/ZClasses/ZClass.py
View file @
9776cfc7
...
...
@@ -126,12 +126,6 @@ def find_class(ob, name):
continue
raise
AttributeError
,
name
def
dbVersionEquals
(
ver
):
# A helper function to isolate db version checking.
return
hasattr
(
Globals
,
'DatabaseVersion'
)
and
\
Globals
.
DatabaseVersion
==
ver
bad_id
=
re
.
compile
(
'[^a-zA-Z0-9_]'
).
search
def
manage_addZClass
(
self
,
id
,
title
=
''
,
baseclasses
=
[],
...
...
@@ -139,6 +133,7 @@ def manage_addZClass(self, id, title='', baseclasses=[],
zope_object
=
0
):
"""Add a Z Class
"""
if
bad_id
(
id
)
is
not
None
:
raise
BadRequest
,
(
'The id %s is invalid as a class name.'
%
id
)
...
...
@@ -351,8 +346,6 @@ class ZClass( Base
changeClassId__roles__
=
()
# Private
def
changeClassId
(
self
,
newid
=
None
):
if
not
dbVersionEquals
(
'3'
):
return
if
newid
is
None
:
newid
=
self
.
_new_class_id
()
self
.
_unregister
()
if
newid
:
...
...
@@ -427,16 +420,12 @@ class ZClass( Base
self
.
propertysheets
.
methods
.
manage_afterClone
(
item
)
def
manage_afterAdd
(
self
,
item
,
container
):
if
not
dbVersionEquals
(
'3'
):
return
if
not
self
.
_zclass_
.
__module__
:
self
.
setClassAttr
(
'__module__'
,
self
.
_new_class_id
())
self
.
_register
()
self
.
propertysheets
.
methods
.
manage_afterAdd
(
item
,
container
)
def
manage_beforeDelete
(
self
,
item
,
container
):
if
not
dbVersionEquals
(
'3'
):
return
self
.
_unregister
()
self
.
propertysheets
.
methods
.
manage_beforeDelete
(
item
,
container
)
...
...
lib/python/Zope2/App/startup.py
View file @
9776cfc7
...
...
@@ -40,8 +40,6 @@ import ZPublisher
def
startup
():
global
app
Globals
.
DatabaseVersion
=
'3'
# Import products
OFS
.
Application
.
import_products
()
...
...
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