Commit 0189cf89 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

overriding (get)SearchableText method is no longer required.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@38278 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 149d6be0
......@@ -43,19 +43,3 @@ class SoftwareLicence(TextDocument, Item):
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
def getSearchableText(self):
"""Text for full text search"""
text_list = []
for prop in ( self.getTitle(),
self.getDescription(),
self.getShortTitle(),
):
if prop:
text_list.append(str(prop))
for subject in self.getSubjectList():
text_list.append(str(subject))
return ' '.join(text_list)
SearchableText = getSearchableText
......@@ -55,19 +55,3 @@ class SoftwareProduct(Resource):
# content_type property is also a method from PortalFolder, so we need a
# valid type by default.
content_type = ''
security.declareProtected(Permissions.AccessContentsInformation,
'SearchableText')
def SearchableText(self):
"""Text for full text search"""
text_list = []
for prop in ( self.getTitle(),
self.getDescription(),
self.getUrlString(),
):
if prop:
text_list.append(str(prop))
for subject in self.getSubjectList():
text_list.append(str(subject))
return ' '.join(text_list)
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<tuple/>
</tuple>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
</pickle>
<pickle>
<dictionary>
......@@ -78,15 +75,23 @@
<key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value>
</item>
<item>
<key> <string>searchable_text_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>description</string>
<string>short_title</string>
<string>subject_list</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
......@@ -103,10 +108,7 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
......
......@@ -2,10 +2,7 @@
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<tuple/>
</tuple>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
</pickle>
<pickle>
<dictionary>
......@@ -92,15 +89,23 @@
<key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value>
</item>
<item>
<key> <string>searchable_text_property_id</string> </key>
<value>
<tuple>
<string>title</string>
<string>description</string>
<string>url_string</string>
<string>subject_list</string>
</tuple>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
......@@ -117,10 +122,7 @@
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
......@@ -137,10 +139,7 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
</pickle>
<pickle>
<dictionary>
......
66
\ No newline at end of file
67
\ 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