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 @@
#
##############################################################################
__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
...
...
@@ -96,7 +96,7 @@ from App.Dialogs import MessageDialog
from
Product
import
ProductFolder
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
):
"""Database management"""
...
...
@@ -217,7 +217,7 @@ class ApplicationManager(Folder,CacheManager):
db
=
Globals
.
Bobobase
.
_jar
.
db
db
.
save_index
()
db
.
file
.
close
()
db
=
Globals
.
Ses
sionBase
.
TDB
db
=
Globals
.
Ver
sionBase
.
TDB
db
.
save_index
()
db
.
file
.
close
()
sys
.
exit
(
0
)
...
...
@@ -225,9 +225,9 @@ class ApplicationManager(Folder,CacheManager):
def
manage_pack
(
self
,
days
=
0
,
REQUEST
=
None
):
"""Pack the database"""
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
working in a <em>
ses
sion</em>'''
)
working in a <em>
ver
sion</em>'''
)
t
=
time
.
time
()
-
days
*
86400
if
Globals
.
Bobobase
.
has_key
(
'_pack_time'
):
since
=
Globals
.
Bobobase
[
'_pack_time'
]
...
...
lib/python/App/CacheManager.py
View file @
0f45bcc2
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Cache management support
$Id: CacheManager.py,v 1.1
1 1999/03/10 00:14:55 klm
Exp $'''
__version__
=
'$Revision: 1.1
1
$'
[
11
:
-
2
]
$Id: CacheManager.py,v 1.1
2 1999/03/22 18:13:41 michel
Exp $'''
__version__
=
'$Revision: 1.1
2
$'
[
11
:
-
2
]
import
Globals
,
time
,
sys
...
...
@@ -107,9 +107,9 @@ class CacheManager:
def
manage_cache_age
(
self
,
value
,
REQUEST
):
"set cache age"
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
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
return
self
.
manage_CacheParameters
(
self
,
REQUEST
)
...
...
@@ -117,9 +117,9 @@ class CacheManager:
def
manage_cache_size
(
self
,
value
,
REQUEST
):
"set cache size"
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
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
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.
<BR><INPUT TYPE="SUBMIT" VALUE="Shutdown">
</FORM>
<!--#if Principia-
Ses
sion-->
<EM>You are currently working in
session <!--#var Principia-Ses
sion--></EM>
<!--#/if Principia-
Ses
sion-->
<!--#if Principia-
Ver
sion-->
<EM>You are currently working in
version <!--#var Principia-Ver
sion--></EM>
<!--#/if Principia-
Ver
sion-->
<P>
<TABLE>
...
...
@@ -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">
<!--#var title-->
</A>
<!--#if locked_in_
ses
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ver
sion-->
<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-->
<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-->
</TD>
...
...
lib/python/Globals.py
View file @
0f45bcc2
...
...
@@ -85,7 +85,7 @@
"""Global definitions"""
__version__
=
'$Revision: 1.3
6
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.3
7
$'
[
11
:
-
2
]
import
sys
,
os
from
DateTime
import
DateTime
...
...
@@ -177,12 +177,12 @@ class PersistentUtil:
except
:
t
=
0
return
DateTime
(
t
)
def
locked_in_
ses
sion
(
self
):
def
locked_in_
ver
sion
(
self
):
oid
=
self
.
_p_oid
return
(
oid
and
Ses
sionBase
.
locks
.
has_key
(
oid
)
and
Ses
sionBase
.
verify_lock
(
oid
))
return
(
oid
and
Ver
sionBase
.
locks
.
has_key
(
oid
)
and
Ver
sionBase
.
verify_lock
(
oid
))
def
modified_in_
ses
sion
(
self
):
def
modified_in_
ver
sion
(
self
):
jar
=
self
.
_p_jar
if
jar
is
None
:
if
hasattr
(
self
,
'aq_parent'
)
and
hasattr
(
self
.
aq_parent
,
'_p_jar'
):
...
...
@@ -235,7 +235,7 @@ BobobaseName = '%s/Data.bbb' % data_dir
from
App.Dialogs
import
MessageDialog
SessionNameName
=
'Principia-Ses
sion'
VersionNameName
=
'Principia-Ver
sion'
# utility stuff
...
...
lib/python/Main.py
View file @
0f45bcc2
...
...
@@ -101,20 +101,20 @@ BoboPOS.PickleJar.PickleJar.Broken=OFS.Uninstalled.Broken
# Open the application database
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'
):
quota
=
string
.
atoi
(
os
.
environ
[
'ZOPE_DATABASE_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
)
Ses
sionBase
.
TDB
.
set_quota
(
Ver
sionBase
.
TDB
.
set_quota
(
lambda
x
,
quota
=
quota
,
otherdb
=
Bobobase
.
_jar
.
db
:
x
+
otherdb
.
pos
>
quota
)
SingleThreadedTransaction
.
Transaction
.
commit
=
Ses
sionBase
.
committer
()
SingleThreadedTransaction
.
Transaction
.
commit
=
Ver
sionBase
.
committer
()
bobo_application
=
app
=
Bobobase
[
'Application'
]
...
...
lib/python/OFS/Application.py
View file @
0f45bcc2
...
...
@@ -85,8 +85,8 @@
__doc__
=
'''Application support
$Id: Application.py,v 1.9
1 1999/03/22 17:30:08 jim
Exp $'''
__version__
=
'$Revision: 1.9
1
$'
[
11
:
-
2
]
$Id: Application.py,v 1.9
2 1999/03/22 18:13:42 michel
Exp $'''
__version__
=
'$Revision: 1.9
2
$'
[
11
:
-
2
]
import
Globals
,
Folder
,
os
,
regex
,
sys
,
App
.
Product
,
App
.
ProductRegistry
...
...
@@ -257,8 +257,8 @@ class Application(Globals.ApplicationDefaultPermissions, Folder.Folder,
Redirect
=
ZopeRedirect
=
PrincipiaRedirect
def
__bobo_traverse__
(
self
,
REQUEST
,
name
=
None
):
if
name
is
None
and
REQUEST
.
has_key
(
Globals
.
Ses
sionNameName
):
pd
=
Globals
.
SessionBase
[
REQUEST
[
Globals
.
Ses
sionNameName
]]
if
name
is
None
and
REQUEST
.
has_key
(
Globals
.
Ver
sionNameName
):
pd
=
Globals
.
VersionBase
[
REQUEST
[
Globals
.
Ver
sionNameName
]]
alternate_self
=
pd
.
jar
[
self
.
_p_oid
]
if
hasattr
(
self
,
'aq_parent'
):
alternate_self
=
alternate_self
.
__of__
(
self
.
aq_parent
)
...
...
lib/python/OFS/Moniker.py
View file @
0f45bcc2
...
...
@@ -86,11 +86,11 @@
An object moniker is an intelligent reference to a
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.
"""
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
10
$'
[
11
:
-
2
]
import
Globals
...
...
@@ -98,7 +98,7 @@ import Globals
class
Moniker
:
"""An object moniker is an intelligent reference to a
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."""
def
__init__
(
self
,
ob
=
None
):
...
...
@@ -123,7 +123,7 @@ class Moniker:
def
bind
(
self
):
"Return the real object named by this moniker"
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
for
n
in
self
.
ids
:
o
=
jar
[
n
]
...
...
lib/python/OFS/main.dtml
View file @
0f45bcc2
...
...
@@ -25,13 +25,13 @@
<A HREF="<!--#var sequence-key url_quote-->/manage_workspace">
<!--#var sequence-key--> <!--#if title-->(<!--#var title-->)<!--#/if-->
</A>
<!--#if locked_in_
ses
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ver
sion-->
<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-->
<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-->
</TD>
...
...
lib/python/OFS/properties.dtml
View file @
0f45bcc2
...
...
@@ -5,11 +5,11 @@
<body
bgcolor=
"#FFFFFF"
link=
"#000099"
vlink=
"#555555"
>
<!--#var manage_tabs-->
<!--#if Principia-
Ses
sion-->
<!--#if Principia-
Ver
sion-->
<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>
<!--#/if Principia-
Ses
sion-->
<!--#/if Principia-
Ver
sion-->
<form
action=
"."
method=
"POST"
>
<!--#if propertyMap-->
...
...
lib/python/ZClasses/contents.dtml
View file @
0f45bcc2
...
...
@@ -5,10 +5,10 @@
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<!--#var manage_tabs-->
<P>
<!--#if Principia-
Ses
sion-->
<EM>You are currently working in
session <!--#var Principia-Ses
sion--></EM>
<!--#if Principia-
Ver
sion-->
<EM>You are currently working in
version <!--#var Principia-Ver
sion--></EM>
<P>
<!--#/if Principia-
Ses
sion-->
<!--#/if Principia-
Ver
sion-->
<FORM ACTION="." METHOD="POST">
<!--#if objectItems-->
...
...
@@ -33,13 +33,13 @@
<!--#/if-->
<!--#if title-->(<!--#var title-->)<!--#/if-->
</A>
<!--#if locked_in_
ses
sion-->
<!--#if modified_in_
ses
sion-->
<!--#if locked_in_
ver
sion-->
<!--#if modified_in_
ver
sion-->
<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-->
<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-->
</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