Diff for /ZSQLExtend/ZSQLExtend.py between versions 1.71 and 1.73

version 1.71, 2005/11/08 13:37:32 version 1.73, 2005/11/23 14:15:11
Line 98  class ZSQLExtendFolder(Folder,Persistent Line 98  class ZSQLExtendFolder(Folder,Persistent
         """erzeuge index aus feld"""          """erzeuge index aus feld"""
         index={}          index={}
         founds=self.ZSQLSimpleSearch("""SELECT %s,oid FROM %s LIMIT 2000"""%(field,table))          founds=self.ZSQLSimpleSearch("""SELECT %s,oid FROM %s LIMIT 2000"""%(field,table))
         print len(founds)  
         for found in founds:          for found in founds:
             tmp=getattr(found,field,None)              tmp=getattr(found,field,None)
             if tmp:              if tmp:
Line 202  class ZSQLExtendFolder(Folder,Persistent Line 202  class ZSQLExtendFolder(Folder,Persistent
     def formatAscii(self,str,url=None):      def formatAscii(self,str,url=None):
         """ersetze ascii umbrueche durch <br>"""          """ersetze ascii umbrueche durch <br>"""
         #url=None          #url=None
           str=str.rstrip().lstrip()
           
         if url and str:          if url and str:
                           
             retStr=""              retStr=""
Line 812  class ZSQLExtendFolder(Folder,Persistent Line 814  class ZSQLExtendFolder(Folder,Persistent
   
         #check for op           #check for op 
         splitted=qs.split(",")          splitted=qs.split(",")
         print splitted  
         if tableExt:          if tableExt:
             table=tableExt              table=tableExt
   
Line 914  class ZSQLExtendFolder(Folder,Persistent Line 916  class ZSQLExtendFolder(Folder,Persistent
                     op="ct"                      op="ct"
                 namealt=name                  namealt=name
                 name="LOWER("+punktsplit[1]+")"                   name="LOWER("+punktsplit[1]+")" 
                 print "XX",op     
                 if op=="ct":                  if op=="ct":
                     tmp=(name+" LIKE "+sql_quote("%"+value+"%"))                      tmp=(name+" LIKE "+sql_quote("%"+value+"%"))
                 elif op=="gt":                  elif op=="gt":
Line 948  class ZSQLExtendFolder(Folder,Persistent Line 950  class ZSQLExtendFolder(Folder,Persistent
   
                 op="all"                  op="all"
   
                 print punktsplit  
                 searchTmp="""%s in (select %s from %s where %s)"""%(punktsplit[3],punktsplit[2],punktsplit[0],tmp)                  searchTmp="""%s in (select %s from %s where %s)"""%(punktsplit[3],punktsplit[2],punktsplit[0],tmp)
                 print "got",searchTmp  
                 queryTemplate.append(searchTmp)                  queryTemplate.append(searchTmp)
                                   
             elif (not name[0]==iCT) and (not len(value)==0):              elif (not name[0]==iCT) and (not len(value)==0):
Line 1031  class ZSQLExtendFolder(Folder,Persistent Line 1033  class ZSQLExtendFolder(Folder,Persistent
         #print "QE",table          #print "QE",table
         #print (select,table,where,sort,maxstr,skip)          #print (select,table,where,sort,maxstr,skip)
         query="SELECT %s FROM %s %s %s %s %s"%(select,table,where,sort,maxstr,skip)          query="SELECT %s FROM %s %s %s %s %s"%(select,table,where,sort,maxstr,skip)
         print query  
         if not nostore=="yes":          if not nostore=="yes":
                           
             self.REQUEST.SESSION['qs']=opfields              self.REQUEST.SESSION['qs']=opfields

Removed from v.1.71  
changed lines
  Added in v.1.73


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>