version 1.299, 2008/12/04 21:27:00
|
version 1.301, 2008/12/17 12:12:26
|
Line 40 from Globals import Persistent, package_
|
Line 40 from Globals import Persistent, package_
|
from Acquisition import Implicit |
from Acquisition import Implicit |
from Products.ZCatalog.CatalogPathAwareness import CatalogAware |
from Products.ZCatalog.CatalogPathAwareness import CatalogAware |
from Products.ZCTextIndex.ZCTextIndex import manage_addLexicon |
from Products.ZCTextIndex.ZCTextIndex import manage_addLexicon |
|
try: |
from Products.MetaDataProvider.MetaDataClient import MetaDataClient |
from Products.MetaDataProvider.MetaDataClient import MetaDataClient |
|
except: |
|
print "no metadataclient" |
import urllib |
import urllib |
import urllib2 |
import urllib2 |
import cgi |
import cgi |
Line 2194 class ECHO_root(Folder,Persistent,Implic
|
Line 2197 class ECHO_root(Folder,Persistent,Implic
|
"""ret attribute if existing""" |
"""ret attribute if existing""" |
try: |
try: |
|
|
return getattr(found,field)#.decode('utf-8','ignore') |
|
|
return getattr(found,field)#.decode('ascii','ignore') |
|
|
|
|
|
|
except: |
except: |
logging.error("can't: decode: %s"%repr(field)) |
logging.error("can't: decode: %s"%repr(field)) |
logging.error(" %s %s"%(sys.exc_info()[0],sys.exc_info()[1])) |
logging.error(" %s %s"%(sys.exc_info()[0],sys.exc_info()[1])) |
Line 2546 class ECHO_root(Folder,Persistent,Implic
|
Line 2553 class ECHO_root(Folder,Persistent,Implic
|
|
|
ret="""<html><body><h2>Resources in ECHO</h3>""" |
ret="""<html><body><h2>Resources in ECHO</h3>""" |
|
|
resources = self.ZopeFind(self,obj_metatypes=['ECHO_resource'],search_sub=1) |
resources = self.ZopeFind(self,obj_metatypes=['ECHO_resource','VLP_resource'],search_sub=1) |
ret+="""<h3>Found %i resources</h3>"""%len(resources) |
ret+="""<h3>Found %i resources</h3>"""%len(resources) |
resources.sort(sortHTML) |
resources.sort(sortHTML) |
for resource in resources: |
for resource in resources: |
Line 2572 class ECHO_root(Folder,Persistent,Implic
|
Line 2579 class ECHO_root(Folder,Persistent,Implic
|
"""gebe all ressourcen aus""" |
"""gebe all ressourcen aus""" |
ret="""<?xml version="1.0" ?> |
ret="""<?xml version="1.0" ?> |
<index>""" |
<index>""" |
for resource in self.ZopeFind(self,obj_metatypes=['ECHO_resource'],search_sub=1): |
for resource in self.ZopeFind(self,obj_metatypes=['ECHO_resource','VLP_resource'],search_sub=1): |
|
|
echo_url=resource[1].absolute_url() |
echo_url=resource[1].absolute_url() |
if hasattr(resource[1],'link'): |
if hasattr(resource[1],'link'): |