Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
4c129961
Commit
4c129961
authored
Nov 26, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't insert in full_text table if there are no SearchableText
parent
60c128b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
bt5/erp5_full_text_myisam_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
...tal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
+22
-11
bt5/erp5_full_text_myisam_catalog/bt/revision
bt5/erp5_full_text_myisam_catalog/bt/revision
+1
-1
No files found.
bt5/erp5_full_text_myisam_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
View file @
4c129961
...
@@ -55,20 +55,31 @@ SearchableText</string> </value>
...
@@ -55,20 +55,31 @@ SearchableText</string> </value>
<key>
<string>
src
</string>
</key>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
<value>
<string
encoding=
"cdata"
>
<![CDATA[
REPLACE INTO\n
DELETE FROM\n
full_text\n
WHERE\n
<dtml-in uid>
\n
uid=
<dtml-sqlvar
sequence-item
type=
"int"
><dtml-if
sequence-end
><dtml-else>
OR
</dtml-if>
\n
</dtml-in>
\n
;\n
<dtml-var
"\'\\0\'"
><dtml-let
document_list=
"[]"
>
\n
<dtml-in
prefix=
"loop"
expr=
"_.range(_.len(uid))"
>
\n
<dtml-if
"SearchableText[loop_item]"
>
\n
<dtml-call
expr=
"document_list.append(loop_item)"
>
\n
</dtml-if>
\n
</dtml-in>
\n
<dtml-if
expr=
"_.len(document_list) > 0"
>
\n
INSERT INTO\n
full_text\n
full_text\n
VALUES\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))
">
\n
<dtml-in
prefix=
"loop"
expr=
"document_list
"
>
\n
(\n
(
\n
<dtml-sqlvar
expr=
"uid[loop_item]"
type=
"int"
>
,
\n
<dtml-sqlvar
expr=
"uid[loop_item]"
type=
"int"
>
,\n
<dtml-sqlvar
expr=
"SearchableText[loop_item]"
type=
"string"
optional
>
\n
<dtml-sqlvar
expr=
"SearchableText[loop_item]"
type=
"string"
optional
>
\n
)\n
)
<dtml-unless
sequence-end
>
,
</dtml-unless>
\n
<dtml-if
sequence-end
>
\n
</dtml-in>
\n
<dtml-else>
\n
</dtml-if>
\n
,\n
</dtml-let>
</dtml-if>
\n
</dtml-in>
\n
]]>
</string>
</value>
]]>
</string>
</value>
</item>
</item>
...
...
bt5/erp5_full_text_myisam_catalog/bt/revision
View file @
4c129961
5
6
\ 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