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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4681d8c2
Commit
4681d8c2
authored
Jan 16, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move check to one place in code.
parent
71185457
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
...g/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
+1
-3
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
...skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
+6
-0
bt5/erp5_dms_conversion_catalog/bt/revision
bt5/erp5_dms_conversion_catalog/bt/revision
+1
-1
No files found.
bt5/erp5_dms_conversion_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_preConvertDocumentList.xml
View file @
4681d8c2
...
@@ -62,11 +62,9 @@ if address not in MARKER and port not in MARKER:\n
...
@@ -62,11 +62,9 @@ if address not in MARKER and port not in MARKER:\n
for index_uid in range(len(uid)):\n
for index_uid in range(len(uid)):\n
document_relative_url = getRelativeUrl[index_uid]\n
document_relative_url = getRelativeUrl[index_uid]\n
document = portal.restrictedTraverse(document_relative_url)\n
document = portal.restrictedTraverse(document_relative_url)\n
allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList()\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\n
# XXX: we do check if "data" methods exists on pretending to be Document portal types\n
# we need a way to do this by introspection\n
# we need a way to do this by introspection\n
if document.getPortalType() in allowed_portal_type_list and \\\n
if ((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
((getattr(document, "getData", None) is not None and document.getData() not in MARKER) or \\\n
(getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n
(getattr(document, "getBaseData", None) is not None and document.getBaseData() not in MARKER)):\n
document.activate(serialize_tag="conversion").Base_callPreConvert()\n
document.activate(serialize_tag="conversion").Base_callPreConvert()\n
</string>
</value>
</string>
</value>
...
...
bt5/erp5_dms_conversion_catalog/SkinTemplateItem/portal_skins/erp5_dms_conversion_catalog/Base_callPreConvert.xml
View file @
4681d8c2
...
@@ -57,6 +57,12 @@
...
@@ -57,6 +57,12 @@
portal = context.getPortalObject()\n
portal = context.getPortalObject()\n
\n
\n
portal_type = context.getPortalType()\n
portal_type = context.getPortalType()\n
allowed_portal_type_list = portal.getPortalDocumentTypeList() + portal.getPortalEmbeddedDocumentTypeList()\n
\n
if portal_type not in allowed_portal_type_list:\n
# no need to convert any non DMS types\n
return\n
\n
format = portal.portal_preferences.getPreferredImageFormat()\n
format = portal.portal_preferences.getPreferredImageFormat()\n
quality = portal.portal_preferences.getPreferredImageQuality()\n
quality = portal.portal_preferences.getPreferredImageQuality()\n
preferred_image_size = portal.portal_preferences.getPreferredImageSize()\n
preferred_image_size = portal.portal_preferences.getPreferredImageSize()\n
...
...
bt5/erp5_dms_conversion_catalog/bt/revision
View file @
4681d8c2
13
14
\ No newline at end of file
\ No newline at end of file
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