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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
b0b09d75
Commit
b0b09d75
authored
Nov 20, 2012
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not allow a thread reference overlap with any traversable Web Section or root module ID.
parent
c1482525
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.xml
.../erp5_discussion/WebSection_createNewDiscussionThread.xml
+7
-2
bt5/erp5_discussion/bt/revision
bt5/erp5_discussion/bt/revision
+1
-1
No files found.
bt5/erp5_discussion/SkinTemplateItem/portal_skins/erp5_discussion/WebSection_createNewDiscussionThread.xml
View file @
b0b09d75
...
...
@@ -81,8 +81,13 @@ multimembership_criterion_base_category_list = context.getMultimembershipCriteri
reference = context.Base_generateReferenceFromString(title)\n
\n
existing_document = context.getDocumentValue(reference)\n
if existing_document is not None:\n
# if there are other document which reference duplicates just add some random part\n
existing_web_section_list = portal.portal_catalog(id=reference, portal_type=[\'Web Site\', \'Web Section\'])\n
existing_module_list = portal.portal_catalog(id=reference, parent_uid=portal.getUid())\n
if existing_document is not None \\\n
or len(existing_web_section_list) \\\n
or len(existing_module_list):\n
# if there are other document or any tarversal objects (module, web section)\n
# which ID or reference duplicates just add some random part\n
# so we can distinguish)\n
reference = \'%s-%s\' %(context.Base_generateRandomString(), reference)\n
\n
...
...
bt5/erp5_discussion/bt/revision
View file @
b0b09d75
129
\ No newline at end of file
130
\ 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