Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Georgios Dagkakis
erp5
Commits
efaee02a
Commit
efaee02a
authored
Dec 19, 2013
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove deprecation warnings.
parent
aa4c5121
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
43 additions
and
37 deletions
+43
-37
product/ERP5/Extensions/CheckSkins.py
product/ERP5/Extensions/CheckSkins.py
+2
-3
product/ERP5Configurator/Document/BusinessConfiguration.py
product/ERP5Configurator/Document/BusinessConfiguration.py
+1
-1
product/ERP5Form/FSForm.py
product/ERP5Form/FSForm.py
+2
-3
product/ERP5OOo/FormPrintout.py
product/ERP5OOo/FormPrintout.py
+1
-1
product/ERP5SecurePayment/Tool/SecurePaymentTool.py
product/ERP5SecurePayment/Tool/SecurePaymentTool.py
+1
-1
product/ERP5ShortMessage/Tool/SMSTool.py
product/ERP5ShortMessage/Tool/SMSTool.py
+1
-1
product/ERP5SyncML/Conduit/ERP5Conduit.py
product/ERP5SyncML/Conduit/ERP5Conduit.py
+2
-2
product/ERP5TioSafe/Tool/IntegrationTool.py
product/ERP5TioSafe/Tool/IntegrationTool.py
+1
-1
product/ERP5Type/XMLExportImport.py
product/ERP5Type/XMLExportImport.py
+2
-2
product/ERP5Type/patches/FSZSQLMethod.py
product/ERP5Type/patches/FSZSQLMethod.py
+5
-4
product/Formulator/FSForm.py
product/Formulator/FSForm.py
+3
-4
product/Formulator/Form.py
product/Formulator/Form.py
+1
-1
product/MailTemplates/FSMailTemplate.py
product/MailTemplates/FSMailTemplate.py
+1
-2
product/PortalTransforms/chain.py
product/PortalTransforms/chain.py
+1
-1
product/ZLDAPConnection/Entry.py
product/ZLDAPConnection/Entry.py
+2
-1
product/ZLDAPConnection/ZLDAP.py
product/ZLDAPConnection/ZLDAP.py
+3
-1
product/ZLDAPMethods/LM.py
product/ZLDAPMethods/LM.py
+10
-6
product/ZLDAPMethods/ldifvar.py
product/ZLDAPMethods/ldifvar.py
+0
-1
product/ZSQLCatalog/ZSQLCatalog.py
product/ZSQLCatalog/ZSQLCatalog.py
+4
-1
No files found.
product/ERP5/Extensions/CheckSkins.py
View file @
efaee02a
...
...
@@ -3,7 +3,6 @@ import re
import
os
import
sys
import
csv
from
Products.CMFCore.utils
import
expandpath
from
zLOG
import
LOG
from
App.config
import
getConfiguration
...
...
@@ -228,7 +227,7 @@ def fixSkinNames(self, REQUEST=None, file=None, dry_run=0):
msg
+=
'%s
\
n
'
%
line
if
not
dry_run
:
if
skin
.
meta_type
in
fs_skin_spec
:
with
open
(
expandpath
(
skin
.
getObjectFSPath
()
),
'w'
)
as
f
:
with
open
(
skin
.
getObjectFSPath
(
),
'w'
)
as
f
:
f
.
write
(
text
)
else
:
REQUEST
[
'BODY'
]
=
text
...
...
@@ -359,7 +358,7 @@ def fixSkinNames(self, REQUEST=None, file=None, dry_run=0):
try
:
if
info
.
meta_type
in
fs_skin_spec
:
skin
=
self
.
portal_skins
[
info
.
folder
][
info
.
name
]
old_path
=
expandpath
(
skin
.
getObjectFSPath
()
)
old_path
=
skin
.
getObjectFSPath
(
)
new_path
=
info
.
regexp
.
sub
(
info
.
new_name
,
old_path
)
if
info
.
removed
:
os
.
remove
(
old_path
)
...
...
product/ERP5Configurator/Document/BusinessConfiguration.py
View file @
efaee02a
...
...
@@ -28,7 +28,7 @@
##############################################################################
from
AccessControl
import
ClassSecurityInfo
from
Globals
import
PersistentMapping
from
Persistence
import
PersistentMapping
from
Acquisition
import
aq_base
from
Products.ERP5Type
import
Permissions
,
PropertySheet
...
...
product/ERP5Form/FSForm.py
View file @
efaee02a
...
...
@@ -5,7 +5,6 @@ from Products.CMFCore.permissions import View, ViewManagementScreens
from
Products.CMFCore.FSObject
import
FSObject
from
Products.CMFCore.DirectoryView
import
registerFileExtension
,
\
registerMetaType
from
Products.CMFCore.utils
import
expandpath
from
Products.ERP5Form
import
_dtmldir
from
Products.ERP5Form.Form
import
ERP5Form
...
...
@@ -39,7 +38,7 @@ class ERP5FSForm(FSObject, ERP5Form):
return
obj
def
_readFile
(
self
,
reparse
):
f
=
open
(
expandpath
(
self
.
_filepath
)
,
'rb'
)
f
=
open
(
self
.
_filepath
,
'rb'
)
# update the form with the xml data
try
:
XMLToForm
(
f
.
read
(),
self
)
...
...
@@ -49,7 +48,7 @@ class ERP5FSForm(FSObject, ERP5Form):
# (except if the LOG raises another one ... should we be more paranoid here?)
import
zLOG
zLOG
.
LOG
(
'Formulator.FSForm'
,
zLOG
.
ERROR
,
'error reading form from file '
+
expandpath
(
self
.
_filepath
)
)
'error reading form from file '
+
self
.
_filepath
)
raise
f
.
close
()
...
...
product/ERP5OOo/FormPrintout.py
View file @
efaee02a
...
...
@@ -38,7 +38,7 @@ from Products.CMFCore.exceptions import AccessControl_Unauthorized
from
Acquisition
import
Implicit
,
aq_base
from
Products.ERP5Type.Globals
import
InitializeClass
,
DTMLFile
,
Persistent
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.R
ole
import
RoleManager
from
OFS.r
ole
import
RoleManager
from
OFS.SimpleItem
import
Item
from
OFS.PropertyManager
import
PropertyManager
from
urllib
import
quote
,
quote_plus
...
...
product/ERP5SecurePayment/Tool/SecurePaymentTool.py
View file @
efaee02a
...
...
@@ -31,7 +31,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Permissions
import
ManagePortal
from
Globals
import
DTMLFile
from
Products.ERP5Type.
Globals
import
DTMLFile
from
Products.ERP5SecurePayment
import
_dtmldir
from
Products.ERP5Security.ERP5UserManager
import
SUPER_USER
from
AccessControl.SecurityManagement
import
newSecurityManager
...
...
product/ERP5ShortMessage/Tool/SMSTool.py
View file @
efaee02a
...
...
@@ -31,7 +31,7 @@ from AccessControl import ClassSecurityInfo
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
from
Products.ERP5Type.Permissions
import
ManagePortal
from
Globals
import
DTMLFile
from
Products.ERP5Type.
Globals
import
DTMLFile
from
Products.ERP5ShortMessage
import
_dtmldir
class
SMSTool
(
BaseTool
):
...
...
product/ERP5SyncML/Conduit/ERP5Conduit.py
View file @
efaee02a
...
...
@@ -52,7 +52,7 @@ from copy import deepcopy
import
logging
syncml_logger
=
logging
.
getLogger
(
'ERP5SyncML'
)
import
sha
from
hashlib
import
sha1
from
Products.ERP5SyncML.SyncMLConstant
import
XUPDATE_ELEMENT
,
\
XUPDATE_INSERT_OR_ADD_LIST
,
XUPDATE_DEL
,
XUPDATE_UPDATE
,
XUPDATE_INSERT_LIST
...
...
@@ -224,7 +224,7 @@ class ERP5Conduit(XMLSyncUtilsMixin):
def deleteWorkflowNode():
for wf_id, wf_history_tuple in object.workflow_history.iteritems():
for wf_history_index, wf_history in enumerate(wf_history_tuple):
if sha
.new
(wf_id + str(wf_history['
time
']) +
if sha
1
(wf_id + str(wf_history['
time
']) +
wf_history['
actor
']).hexdigest() == wf_action_id:
object.workflow_history[wf_id] = (
object.workflow_history[wf_id][:wf_history_index] +
...
...
product/ERP5TioSafe/Tool/IntegrationTool.py
View file @
efaee02a
from
AccessControl
import
ClassSecurityInfo
from
Globals
import
InitializeClass
,
DTMLFile
from
Products.ERP5Type.
Globals
import
InitializeClass
,
DTMLFile
from
Products.ERP5
import
_dtmldir
from
Products.ERP5Type
import
Permissions
from
Products.ERP5Type.Tool.BaseTool
import
BaseTool
...
...
product/ERP5Type/XMLExportImport.py
View file @
efaee02a
...
...
@@ -39,7 +39,7 @@ from OFS.Image import Pdata
from
zLOG
import
LOG
from
base64
import
standard_b64encode
import
sha
from
hashlib
import
sha1
MARSHALLER_NAMESPACE_URI
=
'http://www.erp5.org/namespaces/marshaller'
marshaller
=
Marshaller
(
namespace_uri
=
MARSHALLER_NAMESPACE_URI
,
...
...
@@ -153,7 +153,7 @@ def Base_asXML(object, root=None):
elif
workflow_variable
==
'actor'
:
actor
=
variable_node
.
text
workflow_node
.
attrib
[
'id'
]
=
sha
.
new
(
workflow_id
+
time
+
workflow_node
.
attrib
[
'id'
]
=
sha
1
(
workflow_id
+
time
+
str
(
actor
.
encode
(
'utf-8'
))).
hexdigest
()
# We should now describe security settings
...
...
product/ERP5Type/patches/FSZSQLMethod.py
View file @
efaee02a
...
...
@@ -7,15 +7,16 @@
#
from
Products.CMFCore.FSZSQLMethod
import
FSZSQLMethod
from
Products.CMFCore.utils
import
expandpath
from
Products.ZSQLMethods.SQL
import
SQL
def
FSZSQLMethod_readFile
(
self
,
reparse
):
fp
=
expandpath
(
self
.
_filepath
)
file
=
open
(
fp
,
'r'
)
# not 'rb', as this is a text file!
"""Read the data from the filesystem.
"""
file
=
open
(
self
.
_filepath
,
'r'
)
# not 'rb', as this is a text file!
try
:
data
=
file
.
read
()
finally
:
file
.
close
()
finally
:
file
.
close
()
RESPONSE
=
{}
RESPONSE
[
'BODY'
]
=
data
...
...
product/Formulator/FSForm.py
View file @
efaee02a
...
...
@@ -9,13 +9,12 @@ except ImportError:
from
Products.CMFCore.FSObject
import
FSObject
from
Products.CMFCore.DirectoryView
import
registerFileExtension
,
\
registerMetaType
from
Products.CMFCore.utils
import
expandpath
else
:
# use FileSystemSite product
from
Products.FileSystemSite.Permissions
import
View
from
Products.FileSystemSite.FSObject
import
FSObject
from
Products.FileSystemSite.DirectoryView
import
registerFileExtension
,
\
registerMetaType
,
expandpath
registerMetaType
from
Products.Formulator.Form
import
ZMIForm
from
Products.Formulator.XMLToForm
import
XMLToForm
...
...
@@ -45,7 +44,7 @@ class FSForm(FSObject, ZMIForm):
return
None
def
_readFile
(
self
,
reparse
):
file
=
open
(
expandpath
(
self
.
_filepath
)
,
'rb'
)
file
=
open
(
self
.
_filepath
,
'rb'
)
try
:
data
=
file
.
read
()
finally
:
...
...
@@ -63,7 +62,7 @@ class FSForm(FSObject, ZMIForm):
zLOG
.
LOG
(
'Formulator.FSForm'
,
zLOG
.
ERROR
,
'error reading form from file '
+
expandpath
(
self
.
_filepath
)
)
self
.
_filepath
)
raise
#### The following is mainly taken from Form.py ACCESSORS section ###
...
...
product/Formulator/Form.py
View file @
efaee02a
...
...
@@ -5,7 +5,7 @@ from Acquisition import aq_base
from
App.special_dtml
import
DTMLFile
from
Persistence
import
Persistent
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.R
ole
import
RoleManager
from
OFS.r
ole
import
RoleManager
from
OFS.ObjectManager
import
ObjectManager
from
OFS.PropertyManager
import
PropertyManager
from
OFS.SimpleItem
import
Item
...
...
product/MailTemplates/FSMailTemplate.py
View file @
efaee02a
...
...
@@ -8,7 +8,6 @@ from AccessControl import ClassSecurityInfo
from
AccessControl
import
getSecurityManager
from
App.class_init
import
default__class_init__
as
InitializeClass
from
Products.CMFCore.FSPageTemplate
import
FSPageTemplate
from
Products.CMFCore.utils
import
expandpath
from
Products.CMFCore.DirectoryView
import
registerFileExtension
from
Products.CMFCore.DirectoryView
import
registerMetaType
...
...
@@ -44,7 +43,7 @@ class FSMailTemplate(BaseMailTemplate,FSPageTemplate):
security
.
declarePrivate
(
'_readFile'
)
def
_readFile
(
self
,
reparse
):
fp
=
expandpath
(
self
.
_filepath
)
fp
=
self
.
_filepath
file
=
open
(
fp
,
'r'
)
# not 'rb', as this is a text file!
try
:
data
=
file
.
read
()
...
...
product/PortalTransforms/chain.py
View file @
efaee02a
...
...
@@ -5,7 +5,7 @@ from Persistence import Persistent
from
App.class_init
import
default__class_init__
as
InitializeClass
from
Acquisition
import
Implicit
from
OFS.SimpleItem
import
Item
from
AccessControl.R
ole
import
RoleManager
from
OFS.r
ole
import
RoleManager
from
AccessControl
import
ClassSecurityInfo
from
Products.CMFCore.permissions
import
ManagePortal
,
ManageProperties
...
...
product/ZLDAPConnection/Entry.py
View file @
efaee02a
...
...
@@ -6,7 +6,8 @@ LDAP Entry Objects
__version__
=
"$Revision: 1.13 $"
[
11
:
-
2
]
import
Acquisition
,
AccessControl
,
OFS
,
string
from
Globals
import
HTMLFile
,
MessageDialog
;
import
Globals
from
App.special_dtml
import
HTMLFile
from
App.Dialogs
import
MessageDialog
import
ldap
,
urllib
,
UserList
ConnectionError
=
'ZLDAP Connection Error'
...
...
product/ZLDAPConnection/ZLDAP.py
View file @
efaee02a
...
...
@@ -11,7 +11,9 @@ __version__ = "$Revision: 1.11 $"[11:-2]
import
Acquisition
,
AccessControl
,
OFS
,
string
from
Acquisition
import
aq_base
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
from
App.special_dtml
import
HTMLFile
from
App.Dialogs
import
MessageDialog
from
Persistence
import
Persistent
import
ldap
,
urllib
import
LDCAccessors
...
...
product/ZLDAPMethods/LM.py
View file @
efaee02a
...
...
@@ -2,7 +2,6 @@
# core of LDAP Filter Methods.
from
Globals
import
HTMLFile
,
HTML
__version__
=
"$Revision: 1.10 $"
[
11
:
-
2
]
try
:
...
...
@@ -17,8 +16,10 @@ import string
from
Shared.DC.ZRDB
import
Aqueduct
from
Shared.DC.ZRDB.Aqueduct
import
parse
,
decodestring
,
default_input_form
from
Shared.DC.ZRDB.Results
import
Results
import
Acquisition
,
Globals
,
AccessControl
.
Role
,
OFS
.
SimpleItem
from
Globals
import
HTMLFile
,
MessageDialog
,
Persistent
import
Acquisition
,
AccessControl
.
Role
,
OFS
.
SimpleItem
from
App.special_dtml
import
HTMLFile
from
App.Dialogs
import
MessageDialog
from
Persistence
import
Persistent
import
DocumentTemplate
import
ExtensionClass
import
sys
...
...
@@ -26,7 +27,10 @@ import sys
from
zLOG
import
LOG
,
INFO
from
ldif
import
LDIFRecordList
,
is_dn
,
valid_changetype_dict
,
CHANGE_TYPES
import
ldifvar
from
AccessControl.DTML
import
RestrictedDTML
try
:
from
DocumentTemplate.security
import
RestrictedDTML
except
ImportError
:
# BBB Zope-2.12
from
AccessControl.DTML
import
RestrictedDTML
try
:
from
AccessControl
import
getSecurityManager
except
ImportError
:
...
...
@@ -186,7 +190,7 @@ class LDAPError(Exception):
class
LDAPMethod
(
Aqueduct
.
BaseQuery
,
Acquisition
.
Implicit
,
Globals
.
Persistent
,
Persistent
,
AccessControl
.
Role
.
RoleManager
,
OFS
.
SimpleItem
.
Item
,
):
...
...
@@ -564,4 +568,4 @@ pretty_results=DocumentTemplate.HTML("""\
import
App.class_init
App
.
class_init
.
default__class_init__
(
LDAPMethod
)
App
.
class_init
.
default__class_init__
(
LDIFMethod
)
\ No newline at end of file
App
.
class_init
.
default__class_init__
(
LDIFMethod
)
product/ZLDAPMethods/ldifvar.py
View file @
efaee02a
...
...
@@ -60,7 +60,6 @@
from
DocumentTemplate.DT_Util
import
ParseError
,
parse_params
,
name_param
from
string
import
find
,
split
,
join
,
atoi
,
atof
import
sha
StringType
=
type
(
''
)
str
=
__builtins__
[
'str'
]
...
...
product/ZSQLCatalog/ZSQLCatalog.py
View file @
efaee02a
...
...
@@ -26,7 +26,10 @@ from DocumentTemplate.DT_Util import Eval
from
AccessControl.Permission
import
name_trans
from
SQLCatalog
import
CatalogError
from
AccessControl
import
ClassSecurityInfo
from
AccessControl.DTML
import
RestrictedDTML
try
:
from
DocumentTemplate.security
import
RestrictedDTML
except
ImportError
:
# BBB Zope-2.12
from
AccessControl.DTML
import
RestrictedDTML
from
Products.CMFCore.utils
import
getToolByName
from
Products.ERP5Type.Cache
import
clearCache
import
string
,
sys
...
...
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