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
0f45bcc2
Commit
0f45bcc2
authored
Mar 22, 1999
by
Michel Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed Session to Version
parent
78649564
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
50 additions
and
50 deletions
+50
-50
lib/python/App/ApplicationManager.py
lib/python/App/ApplicationManager.py
+5
-5
lib/python/App/CacheManager.py
lib/python/App/CacheManager.py
+6
-6
lib/python/App/cpContents.dtml
lib/python/App/cpContents.dtml
+7
-7
lib/python/Globals.py
lib/python/Globals.py
+6
-6
lib/python/Main.py
lib/python/Main.py
+4
-4
lib/python/OFS/Application.py
lib/python/OFS/Application.py
+4
-4
lib/python/OFS/Moniker.py
lib/python/OFS/Moniker.py
+4
-4
lib/python/OFS/main.dtml
lib/python/OFS/main.dtml
+4
-4
lib/python/OFS/properties.dtml
lib/python/OFS/properties.dtml
+3
-3
lib/python/ZClasses/contents.dtml
lib/python/ZClasses/contents.dtml
+7
-7
No files found.
lib/python/App/ApplicationManager.py
View file @
0f45bcc2
...
@@ -83,7 +83,7 @@
...
@@ -83,7 +83,7 @@
#
#
##############################################################################
##############################################################################
__doc__
=
"""System management components"""
__doc__
=
"""System management components"""
__version__
=
'$Revision: 1.4
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.4
2
$'
[
11
:
-
2
]
import
sys
,
os
,
time
,
string
,
Globals
,
Acquisition
import
sys
,
os
,
time
,
string
,
Globals
,
Acquisition
...
@@ -96,7 +96,7 @@ from App.Dialogs import MessageDialog
...
@@ -96,7 +96,7 @@ from App.Dialogs import MessageDialog
from
Product
import
ProductFolder
from
Product
import
ProductFolder
class
Fake
:
class
Fake
:
def
locked_in_
ses
sion
(
self
):
return
0
def
locked_in_
ver
sion
(
self
):
return
0
class
DatabaseManager
(
Fake
,
SimpleItem
.
Item
,
Acquisition
.
Implicit
):
class
DatabaseManager
(
Fake
,
SimpleItem
.
Item
,
Acquisition
.
Implicit
):
"""Database management"""
"""Database management"""
...
@@ -217,7 +217,7 @@ class ApplicationManager(Folder,CacheManager):
...
@@ -217,7 +217,7 @@ class ApplicationManager(Folder,CacheManager):
db
=
Globals
.
Bobobase
.
_jar
.
db
db
=
Globals
.
Bobobase
.
_jar
.
db
db
.
save_index
()
db
.
save_index
()
db
.
file
.
close
()
db
.
file
.
close
()
db
=
Globals
.
Ses
sionBase
.
TDB
db
=
Globals
.
Ver
sionBase
.
TDB
db
.
save_index
()
db
.
save_index
()
db
.
file
.
close
()
db
.
file
.
close
()
sys
.
exit
(
0
)
sys
.
exit
(
0
)
...
@@ -225,9 +225,9 @@ class ApplicationManager(Folder,CacheManager):
...
@@ -225,9 +225,9 @@ class ApplicationManager(Folder,CacheManager):
def
manage_pack
(
self
,
days
=
0
,
REQUEST
=
None
):
def
manage_pack
(
self
,
days
=
0
,
REQUEST
=
None
):
"""Pack the database"""
"""Pack the database"""
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'
Ses
sion Error'
,
(
raise
'
Ver
sion Error'
,
(
'''You may not pack the application database while
'''You may not pack the application database while
working in a <em>
ses
sion</em>'''
)
working in a <em>
ver
sion</em>'''
)
t
=
time
.
time
()
-
days
*
86400
t
=
time
.
time
()
-
days
*
86400
if
Globals
.
Bobobase
.
has_key
(
'_pack_time'
):
if
Globals
.
Bobobase
.
has_key
(
'_pack_time'
):
since
=
Globals
.
Bobobase
[
'_pack_time'
]
since
=
Globals
.
Bobobase
[
'_pack_time'
]
...
...
lib/python/App/CacheManager.py
View file @
0f45bcc2
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
__doc__
=
'''Cache management support
__doc__
=
'''Cache management support
$Id: CacheManager.py,v 1.1
1 1999/03/10 00:14:55 klm
Exp $'''
$Id: CacheManager.py,v 1.1
2 1999/03/22 18:13:41 michel
Exp $'''
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
import
Globals
,
time
,
sys
import
Globals
,
time
,
sys
...
@@ -107,9 +107,9 @@ class CacheManager:
...
@@ -107,9 +107,9 @@ class CacheManager:
def
manage_cache_age
(
self
,
value
,
REQUEST
):
def
manage_cache_age
(
self
,
value
,
REQUEST
):
"set cache age"
"set cache age"
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'
Ses
sion Error'
,
(
raise
'
Ver
sion Error'
,
(
'''You may not change the database cache age
'''You may not change the database cache age
while working in a <em>
ses
sion</em>'''
)
while working in a <em>
ver
sion</em>'''
)
self
.
_cache_age
=
Globals
.
Bobobase
.
_jar
.
cache
.
cache_age
=
value
self
.
_cache_age
=
Globals
.
Bobobase
.
_jar
.
cache
.
cache_age
=
value
return
self
.
manage_CacheParameters
(
self
,
REQUEST
)
return
self
.
manage_CacheParameters
(
self
,
REQUEST
)
...
@@ -117,9 +117,9 @@ class CacheManager:
...
@@ -117,9 +117,9 @@ class CacheManager:
def
manage_cache_size
(
self
,
value
,
REQUEST
):
def
manage_cache_size
(
self
,
value
,
REQUEST
):
"set cache size"
"set cache size"
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
if
self
.
_p_jar
.
db
is
not
Globals
.
Bobobase
.
_jar
.
db
:
raise
'
Ses
sion Error'
,
(
raise
'
Ver
sion Error'
,
(
'''You may not change the database cache size
'''You may not change the database cache size
while working in a <em>
ses
sion</em>'''
)
while working in a <em>
ver
sion</em>'''
)
self
.
_cache_size
=
Globals
.
Bobobase
.
_jar
.
cache
.
cache_size
=
value
self
.
_cache_size
=
Globals
.
Bobobase
.
_jar
.
cache
.
cache_size
=
value
return
self
.
manage_cacheParameters
(
self
,
REQUEST
)
return
self
.
manage_cacheParameters
(
self
,
REQUEST
)
...
...
lib/python/App/cpContents.dtml
View file @
0f45bcc2
...
@@ -17,9 +17,9 @@ the <em>Zope</em> process. <em>Zope</em> be restarted on the next web request.
...
@@ -17,9 +17,9 @@ the <em>Zope</em> process. <em>Zope</em> be restarted on the next web request.
<BR><INPUT TYPE="SUBMIT" VALUE="Shutdown">
<BR><INPUT TYPE="SUBMIT" VALUE="Shutdown">
</FORM>
</FORM>
<!--#if Principia-
Ses
sion-->
<!--#if Principia-
Ver
sion-->
<EM>You are currently working in
session <!--#var Principia-Ses
sion--></EM>
<EM>You are currently working in
version <!--#var Principia-Ver
sion--></EM>
<!--#/if Principia-
Ses
sion-->
<!--#/if Principia-
Ver
sion-->
<P>
<P>
<TABLE>
<TABLE>
...
@@ -35,13 +35,13 @@ the <em>Zope</em> process. <em>Zope</em> be restarted on the next web request.
...
@@ -35,13 +35,13 @@ the <em>Zope</em> process. <em>Zope</em> be restarted on the next web request.
<A HREF="<!--#var sequence-key-->/manage_workspace">
<A HREF="<!--#var sequence-key-->/manage_workspace">
<!--#var title-->
<!--#var title-->
</A>
</A>
<!--#if locked_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if modified_in_
ver
sion-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
ALT="This item has been modified in this
ses
sion">
ALT="This item has been modified in this
ver
sion">
<!--#else-->
<!--#else-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
ALT="This item has been modified in another
ses
sion">
ALT="This item has been modified in another
ver
sion">
<!--#/if-->
<!--#/if-->
<!--#/if-->
<!--#/if-->
</TD>
</TD>
...
...
lib/python/Globals.py
View file @
0f45bcc2
...
@@ -85,7 +85,7 @@
...
@@ -85,7 +85,7 @@
"""Global definitions"""
"""Global definitions"""
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
7
$'
[
11
:
-
2
]
import
sys
,
os
import
sys
,
os
from
DateTime
import
DateTime
from
DateTime
import
DateTime
...
@@ -177,12 +177,12 @@ class PersistentUtil:
...
@@ -177,12 +177,12 @@ class PersistentUtil:
except
:
t
=
0
except
:
t
=
0
return
DateTime
(
t
)
return
DateTime
(
t
)
def
locked_in_
ses
sion
(
self
):
def
locked_in_
ver
sion
(
self
):
oid
=
self
.
_p_oid
oid
=
self
.
_p_oid
return
(
oid
and
Ses
sionBase
.
locks
.
has_key
(
oid
)
return
(
oid
and
Ver
sionBase
.
locks
.
has_key
(
oid
)
and
Ses
sionBase
.
verify_lock
(
oid
))
and
Ver
sionBase
.
verify_lock
(
oid
))
def
modified_in_
ses
sion
(
self
):
def
modified_in_
ver
sion
(
self
):
jar
=
self
.
_p_jar
jar
=
self
.
_p_jar
if
jar
is
None
:
if
jar
is
None
:
if
hasattr
(
self
,
'aq_parent'
)
and
hasattr
(
self
.
aq_parent
,
'_p_jar'
):
if
hasattr
(
self
,
'aq_parent'
)
and
hasattr
(
self
.
aq_parent
,
'_p_jar'
):
...
@@ -235,7 +235,7 @@ BobobaseName = '%s/Data.bbb' % data_dir
...
@@ -235,7 +235,7 @@ BobobaseName = '%s/Data.bbb' % data_dir
from
App.Dialogs
import
MessageDialog
from
App.Dialogs
import
MessageDialog
SessionNameName
=
'Principia-Ses
sion'
VersionNameName
=
'Principia-Ver
sion'
# utility stuff
# utility stuff
...
...
lib/python/Main.py
View file @
0f45bcc2
...
@@ -101,20 +101,20 @@ BoboPOS.PickleJar.PickleJar.Broken=OFS.Uninstalled.Broken
...
@@ -101,20 +101,20 @@ BoboPOS.PickleJar.PickleJar.Broken=OFS.Uninstalled.Broken
# Open the application database
# Open the application database
Bobobase
=
OFS
.
Application
.
open_bobobase
()
Bobobase
=
OFS
.
Application
.
open_bobobase
()
SessionBase
=
Globals
.
Ses
sionBase
=
TJar
.
TM
(
Bobobase
)
VersionBase
=
Globals
.
Ver
sionBase
=
TJar
.
TM
(
Bobobase
)
if
os
.
environ
.
has_key
(
'ZOPE_DATABASE_QUOTA'
):
if
os
.
environ
.
has_key
(
'ZOPE_DATABASE_QUOTA'
):
quota
=
string
.
atoi
(
os
.
environ
[
'ZOPE_DATABASE_QUOTA'
])
quota
=
string
.
atoi
(
os
.
environ
[
'ZOPE_DATABASE_QUOTA'
])
Bobobase
.
_jar
.
db
.
set_quota
(
Bobobase
.
_jar
.
db
.
set_quota
(
lambda
x
,
quota
=
quota
,
otherdb
=
Ses
sionBase
.
TDB
:
lambda
x
,
quota
=
quota
,
otherdb
=
Ver
sionBase
.
TDB
:
x
+
otherdb
.
pos
>
quota
)
x
+
otherdb
.
pos
>
quota
)
Ses
sionBase
.
TDB
.
set_quota
(
Ver
sionBase
.
TDB
.
set_quota
(
lambda
x
,
quota
=
quota
,
otherdb
=
Bobobase
.
_jar
.
db
:
lambda
x
,
quota
=
quota
,
otherdb
=
Bobobase
.
_jar
.
db
:
x
+
otherdb
.
pos
>
quota
)
x
+
otherdb
.
pos
>
quota
)
SingleThreadedTransaction
.
Transaction
.
commit
=
Ses
sionBase
.
committer
()
SingleThreadedTransaction
.
Transaction
.
commit
=
Ver
sionBase
.
committer
()
bobo_application
=
app
=
Bobobase
[
'Application'
]
bobo_application
=
app
=
Bobobase
[
'Application'
]
...
...
lib/python/OFS/Application.py
View file @
0f45bcc2
...
@@ -85,8 +85,8 @@
...
@@ -85,8 +85,8 @@
__doc__
=
'''Application support
__doc__
=
'''Application support
$Id: Application.py,v 1.9
1 1999/03/22 17:30:08 jim
Exp $'''
$Id: Application.py,v 1.9
2 1999/03/22 18:13:42 michel
Exp $'''
__version__
=
'$Revision: 1.9
1
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.9
2
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
...
@@ -257,8 +257,8 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
...
@@ -257,8 +257,8 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
Redirect
=
ZopeRedirect
=
PrincipiaRedirect
Redirect
=
ZopeRedirect
=
PrincipiaRedirect
def
__bobo_traverse__
(
self
,
REQUEST
,
name
=
None
):
def
__bobo_traverse__
(
self
,
REQUEST
,
name
=
None
):
if
name
is
None
and
REQUEST
.
has_key
(
Globals
.
Ses
sionNameName
):
if
name
is
None
and
REQUEST
.
has_key
(
Globals
.
Ver
sionNameName
):
pd
=
Globals
.
SessionBase
[
REQUEST
[
Globals
.
Ses
sionNameName
]]
pd
=
Globals
.
VersionBase
[
REQUEST
[
Globals
.
Ver
sionNameName
]]
alternate_self
=
pd
.
jar
[
self
.
_p_oid
]
alternate_self
=
pd
.
jar
[
self
.
_p_oid
]
if
hasattr
(
self
,
'aq_parent'
):
if
hasattr
(
self
,
'aq_parent'
):
alternate_self
=
alternate_self
.
__of__
(
self
.
aq_parent
)
alternate_self
=
alternate_self
.
__of__
(
self
.
aq_parent
)
...
...
lib/python/OFS/Moniker.py
View file @
0f45bcc2
...
@@ -86,11 +86,11 @@
...
@@ -86,11 +86,11 @@
An object moniker is an intelligent reference to a
An object moniker is an intelligent reference to a
persistent object. A moniker can be turned back into
persistent object. A moniker can be turned back into
a real object that retains its correct
ses
sion context
a real object that retains its correct
ver
sion context
and aquisition relationships via a simple interface.
and aquisition relationships via a simple interface.
"""
"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
Globals
import
Globals
...
@@ -98,7 +98,7 @@ import Globals
...
@@ -98,7 +98,7 @@ import Globals
class
Moniker
:
class
Moniker
:
"""An object moniker is an intelligent reference to a
"""An object moniker is an intelligent reference to a
persistent object. A moniker can be turned back into
persistent object. A moniker can be turned back into
a real object that retains its correct
ses
sion context
a real object that retains its correct
ver
sion context
and aquisition relationships via a simple interface."""
and aquisition relationships via a simple interface."""
def
__init__
(
self
,
ob
=
None
):
def
__init__
(
self
,
ob
=
None
):
...
@@ -123,7 +123,7 @@ class Moniker:
...
@@ -123,7 +123,7 @@ class Moniker:
def
bind
(
self
):
def
bind
(
self
):
"Return the real object named by this moniker"
"Return the real object named by this moniker"
if
self
.
jar
is
None
:
jar
=
Globals
.
Bobobase
.
_jar
if
self
.
jar
is
None
:
jar
=
Globals
.
Bobobase
.
_jar
else
:
jar
=
Globals
.
Ses
sionBase
[
self
.
jar
].
jar
else
:
jar
=
Globals
.
Ver
sionBase
[
self
.
jar
].
jar
ob
=
None
ob
=
None
for
n
in
self
.
ids
:
for
n
in
self
.
ids
:
o
=
jar
[
n
]
o
=
jar
[
n
]
...
...
lib/python/OFS/main.dtml
View file @
0f45bcc2
...
@@ -25,13 +25,13 @@
...
@@ -25,13 +25,13 @@
<A HREF="<!--#var sequence-key url_quote-->/manage_workspace">
<A HREF="<!--#var sequence-key url_quote-->/manage_workspace">
<!--#var sequence-key--> <!--#if title-->(<!--#var title-->)<!--#/if-->
<!--#var sequence-key--> <!--#if title-->(<!--#var title-->)<!--#/if-->
</A>
</A>
<!--#if locked_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if modified_in_
ver
sion-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
ALT="This item has been modified in this
ses
sion">
ALT="This item has been modified in this
ver
sion">
<!--#else-->
<!--#else-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
ALT="This item has been modified in another
ses
sion">
ALT="This item has been modified in another
ver
sion">
<!--#/if-->
<!--#/if-->
<!--#/if-->
<!--#/if-->
</TD>
</TD>
...
...
lib/python/OFS/properties.dtml
View file @
0f45bcc2
...
@@ -5,11 +5,11 @@
...
@@ -5,11 +5,11 @@
<body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink=
"#555555"
>
<body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink=
"#555555"
>
<!--#var manage_tabs-->
<!--#var manage_tabs-->
<!--#if Principia-
Ses
sion-->
<!--#if Principia-
Ver
sion-->
<p>
<p>
<em>
You are currently working in
session
<!--#var Principia-Ses
sion-->
</em>
<em>
You are currently working in
version
<!--#var Principia-Ver
sion-->
</em>
</p>
</p>
<!--#/if Principia-
Ses
sion-->
<!--#/if Principia-
Ver
sion-->
<form
action=
"."
method=
"POST"
>
<form
action=
"."
method=
"POST"
>
<!--#if propertyMap-->
<!--#if propertyMap-->
...
...
lib/python/ZClasses/contents.dtml
View file @
0f45bcc2
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<!--#var manage_tabs-->
<P>
<P>
<!--#if Principia-
Ses
sion-->
<!--#if Principia-
Ver
sion-->
<EM>You are currently working in
session <!--#var Principia-Ses
sion--></EM>
<EM>You are currently working in
version <!--#var Principia-Ver
sion--></EM>
<P>
<P>
<!--#/if Principia-
Ses
sion-->
<!--#/if Principia-
Ver
sion-->
<FORM ACTION="." METHOD="POST">
<FORM ACTION="." METHOD="POST">
<!--#if objectItems-->
<!--#if objectItems-->
...
@@ -33,13 +33,13 @@
...
@@ -33,13 +33,13 @@
<!--#/if-->
<!--#/if-->
<!--#if title-->(<!--#var title-->)<!--#/if-->
<!--#if title-->(<!--#var title-->)<!--#/if-->
</A>
</A>
<!--#if locked_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if modified_in_
ver
sion-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/locked"
ALT="This item has been modified in this
ses
sion">
ALT="This item has been modified in this
ver
sion">
<!--#else-->
<!--#else-->
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
<IMG SRC="<!--#var SCRIPT_NAME-->/p_/lockedo"
ALT="This item has been modified in another
ses
sion">
ALT="This item has been modified in another
ver
sion">
<!--#/if-->
<!--#/if-->
<!--#/if-->
<!--#/if-->
</TD>
</TD>
...
...
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