Commit d459963e authored by Sebastien Robin's avatar Sebastien Robin

allows comments inside zsql


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1494 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1ebfe3ef
...@@ -201,8 +201,8 @@ class PatchedDA(DA): ...@@ -201,8 +201,8 @@ class PatchedDA(DA):
""" """
Read the string 'text' and updates self Read the string 'text' and updates self
""" """
start = text.rfind('<dtml-comment>') start = text.find('<dtml-comment>')
end = text.rfind('</dtml-comment>') end = text.find('</dtml-comment>')
block = text[start+14:end] block = text[start+14:end]
parameters = {} parameters = {}
for line in block.split('\n'): for line in block.split('\n'):
...@@ -225,7 +225,6 @@ class PatchedDA(DA): ...@@ -225,7 +225,6 @@ class PatchedDA(DA):
template = text[end+9:] template = text[end+9:]
while template.find('\n')==0: while template.find('\n')==0:
template=template.replace('\n','',1) template=template.replace('\n','',1)
#print "arguments = %s" % str(arguments)
self.manage_edit(title=title, connection_id=connection_id, self.manage_edit(title=title, connection_id=connection_id,
arguments=arguments, template=template) arguments=arguments, template=template)
self.manage_advanced(max_rows, max_cache, cache_time, class_name, class_file) self.manage_advanced(max_rows, max_cache, cache_time, class_name, class_file)
...@@ -829,4 +828,4 @@ class ERP5DCWorkflow(DCWorkflowDefinition): ...@@ -829,4 +828,4 @@ class ERP5DCWorkflow(DCWorkflowDefinition):
pass pass
DCWorkflowDefinition.notifyBefore = ERP5DCWorkflow.notifyBefore DCWorkflowDefinition.notifyBefore = ERP5DCWorkflow.notifyBefore
DCWorkflowDefinition.notifySuccess = ERP5DCWorkflow.notifySuccess DCWorkflowDefinition.notifySuccess = ERP5DCWorkflow.notifySuccess
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment