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): ...@@ -43,19 +43,3 @@ class SoftwareLicence(TextDocument, Item):
# Declarative security # Declarative security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation) 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): ...@@ -55,19 +55,3 @@ class SoftwareProduct(Resource):
# content_type property is also a method from PortalFolder, so we need a # content_type property is also a method from PortalFolder, so we need a
# valid type by default. # valid type by default.
content_type = '' 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 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -78,15 +75,23 @@ ...@@ -78,15 +75,23 @@
<key> <string>product</string> </key> <key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value> <value> <string>ERP5Type</string> </value>
</item> </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> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -103,10 +108,7 @@ ...@@ -103,10 +108,7 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
...@@ -2,10 +2,7 @@ ...@@ -2,10 +2,7 @@
<ZopeData> <ZopeData>
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -92,15 +89,23 @@ ...@@ -92,15 +89,23 @@
<key> <string>product</string> </key> <key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value> <value> <string>ERP5Type</string> </value>
</item> </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> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -117,10 +122,7 @@ ...@@ -117,10 +122,7 @@
</record> </record>
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
...@@ -137,10 +139,7 @@ ...@@ -137,10 +139,7 @@
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="4" aka="AAAAAAAAAAQ=">
<pickle> <pickle>
<tuple> <global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<global name="TranslationInformation" module="Products.ERP5Type.TranslationProviderBase"/>
<tuple/>
</tuple>
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
......
66 67
\ No newline at end of file \ 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