--- ZSQLExtend/ZSQLExtend.py 2004/10/21 15:36:53 1.42 +++ ZSQLExtend/ZSQLExtend.py 2004/10/21 15:58:29 1.43 @@ -17,7 +17,7 @@ def analyseIntSearch(word): #analyse integer searches splitted=word.split("-") - print splitted + if splitted[0]=="": return "< "+splitted[1] @@ -55,10 +55,10 @@ class ZSQLExtendFolder(Folder,Persistent """suche relative haufigkeiten""" ret={} allRecords=len(self.ZSQLSimpleSearch(statement + " where "+wherePart)) - print statement + " where "+wherePart + for oneclass in classes: ret[oneclass]=len(self.ZSQLSimpleSearch(statement + " where ("+wherePart+") and "+ relStatement%oneclass)) - print statement + " where ("+wherePart+") and "+ relStatement%oneclass + return (ret,allRecords) def content_html(self): @@ -283,14 +283,14 @@ class ZSQLExtendFolder(Folder,Persistent qs=[] - + #print "INLINE:",query return self.ZSQLSimpleSearch(query) def ZSQLSimpleSearch(self,query=None): """ returrn SQLSearch""" - #print query + #print "hi",query if not query: query=self.query if getattr(self,'_v_search',None): @@ -679,6 +679,8 @@ class ZSQLExtendFolder(Folder,Persistent elif op=="numerical": term=analyseIntSearch(value) tmp=(name+" "+term) + elif op=="grep": + tmp=(name+" ~* "+sql_quote(value)) elif op=="one": tmps=[] for word in value.split(" "): @@ -811,7 +813,7 @@ class ZSQLExtendFolder(Folder,Persistent def nextLink(self,html,storename="foundCount"): """nextLink""" - print self.REQUEST.SESSION[storename]['rangeSize'] + try: limit=self.REQUEST.SESSION[storename]['rangeSize'] if int(limit)==0 :