Commit 7a65f559 authored by Yoshinori Okuji's avatar Yoshinori Okuji

Pass query_table correctly in buildSQLQuery.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1413 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1e01d5b9
......@@ -26,7 +26,7 @@ from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from DocumentTemplate.DT_Util import Eval
from AccessControl.Permission import name_trans
from SQLCatalog import Catalog, CatalogError
from AccessControl import getSecurityManager
from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.DTML import RestrictedDTML
import string, urllib, os, sys, time, types
......@@ -75,6 +75,7 @@ class ZCatalog(Folder, Persistent, Implicit):
meta_type = "ZSQLCatalog"
icon='misc_/ZCatalog/ZCatalog.gif'
security = ClassSecurityInfo()
manage_options = (
{'label': 'Contents', # TAB: Contents
......@@ -568,6 +569,14 @@ class ZCatalog(Folder, Persistent, Implicit):
def getColumnIds(self):
return self._catalog.getColumnIds()
security.declarePublic('buildSQLQuery')
def buildSQLQuery(self, REQUEST=None, query_table=None, **kw):
"""
Build a SQL query from keywords.
If query_table is specified, it is used as the table name instead of 'catalog'.
"""
return self._catalog.buildSQLQuery(REQUEST=REQUEST, query_table=query_table, **kw)
def searchResults(self, REQUEST=None, used=None, **kw):
"""
Search the catalog according to the ZTables search interface.
......
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