Diff for /ECHO_content/ECHO_collection.py between versions 1.231 and 1.234

version 1.231, 2005/07/29 11:17:08 version 1.234, 2005/09/12 21:51:00
Line 1 Line 1
   
   
 """New version of the product started February, 8th. Without scientific classification, use content-type for further classification."""  """New version of the product started February, 8th. Without scientific classification, use content-type for further classification."""
 """Echo collection provides the classes for the ECHO content web-site.  """Echo collection provides the classes for the ECHO content web-site.
   
Line 1509  class ECHO_collection(Folder, Persistent Line 1507  class ECHO_collection(Folder, Persistent
   
     def localizeObjects(self):      def localizeObjects(self):
         """localize all objects"""          """localize all objects"""
         contents=self.ZopeFind(self,obj_metatypes=['ECHO_link','ECHO_mapText'])          contents=self.ZopeFind(self,obj_metatypes=['ECHO_externalLink','ECHO_link','ECHO_mapText'])
   
         find=self.ZopeFind(self,obj_ids=('locale_en'))          find=self.ZopeFind(self,obj_ids=('locale_en'))
         if not find:          if not find:
         self.manage_addECHO_locale("en",'','')          self.manage_addECHO_locale("en",'','')
         for content in contents:          for content in contents:
             if content[1].meta_type=='ECHO_link':              if content[1].meta_type in['ECHO_link','ECHO_externalLink']:
                 find=content[1].ZopeFind(content[1],obj_metatypes=('ECHO_mapText'))                  find=content[1].ZopeFind(content[1],obj_metatypes=('ECHO_mapText'))
                 if find:                  if find:
                     root=find[0][1]                      root=find[0][1]
Line 3119  class ECHO_root(Folder,Persistent,Implic Line 3118  class ECHO_root(Folder,Persistent,Implic
   
             #str= dom.toxml('utf-8')              #str= dom.toxml('utf-8')
         buf = cStringIO.StringIO()          buf = cStringIO.StringIO()
         PrettyPrint(dom, stream=buf, encoding='UTF-8')          PrettyPrint(dom, stream=buf)
         str = buf.getvalue()          str = buf.getvalue()
         buf.close()          buf.close()
         #str=PrettyPrint(dom.documentElement,encoding='UTF-8')          #str=PrettyPrint(dom.documentElement,encoding='UTF-8')
         #print link.toxml('utf-8')          #print link.toxml('utf-8')
         #print type(str)          #print type(str)
         retStr=regexpPage.search(str)          retStr=regexpPage.search(str)
           
         try: # hack warum fehtl manchmal page??          try: # hack warum fehtl manchmal page??
             return retStr.group(1)              return retStr.group(1)
         except:          except:
Line 3142  class ECHO_root(Folder,Persistent,Implic Line 3142  class ECHO_root(Folder,Persistent,Implic
         except:          except:
             """nothing"""              """nothing"""
                           
         dbs={'vl_technology':'','vl_people':'','vl_sites':''}          dbs={'vl_technology':'','vl_people':" AND complete='yes'",'vl_sites':''}
         res=None          res=None
         for db in dbs.keys():          for db in dbs.keys():
             res=res or self.search(var=str("select reference from %s where reference =\'%s\' %s"%(db,ref,dbs[db])))              res=res or self.search(var=str("select reference from %s where reference =\'%s\' %s"%(db,ref,dbs[db])))

Removed from v.1.231  
changed lines
  Added in v.1.234


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