# HG changeset patch # User casties # Date 1276796339 -7200 # Node ID 39167e96e582813c6ce2b8f5ad928d89ea590035 # Parent 519439a80cd13a017a9ee959c61a77b44c531efc fixed creation of text server on __init__ diff -r 519439a80cd1 -r 39167e96e582 MpdlXmlTextServer.py --- a/MpdlXmlTextServer.py Thu Jun 17 18:48:14 2010 +0200 +++ b/MpdlXmlTextServer.py Thu Jun 17 19:38:59 2010 +0200 @@ -20,12 +20,15 @@ manage_changeMpdlXmlTextServerForm = PageTemplateFile("zpt/manage_changeMpdlXmlTextServer", globals()) - def __init__(self,id,title="",serverUrl="http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/interface/", timeout=40): + def __init__(self,id,title="",serverUrl="http://mpdl-proto.mpiwg-berlin.mpg.de/mpdl/interface/", serverName=None, timeout=40): """constructor""" self.id=id self.title=title self.timeout = timeout - self.serverUrl = serverUrl + if serverName is None: + self.serverUrl = serverUrl + else: + self.serverUrl = "http://%s/mpdl/interface/"%serverName def getHttpData(self, url, data=None): diff -r 519439a80cd1 -r 39167e96e582 documentViewer.py --- a/documentViewer.py Thu Jun 17 18:48:14 2010 +0200 +++ b/documentViewer.py Thu Jun 17 19:38:59 2010 +0200 @@ -145,7 +145,7 @@ self._setObject('template',templateFolder) # old style try: import MpdlXmlTextServer - textServer = MpdlXmlTextServer(id='fulltextclient') + textServer = MpdlXmlTextServer.MpdlXmlTextServer(id='fulltextclient',serverName=textServerName) #templateFolder['fulltextclient'] = xmlRpcClient templateFolder._setObject('fulltextclient',textServer) except Exception, e: @@ -243,17 +243,16 @@ return "ERROR: template folder missing!" if not getattr(self, 'digilibBaseUrl', None): - self.digilibBaseUrl = self.findDigilibUrl() or "http://nausikaa.mpiwg-berlin.mpg.de/digitallibrary" + self.digilibBaseUrl = self.findDigilibUrl() or "http://digilib.mpiwg-berlin.mpg.de/digitallibrary" docinfo = self.getDocinfo(mode=mode,url=url) - if tocMode != "thumbs": # get table of contents docinfo = self.getToc(mode=tocMode, docinfo=docinfo) if viewMode=="auto": # automodus gewaehlt - if docinfo.has_key("textURL") or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert + if docinfo.has_key('textURL') or docinfo.has_key('textURLPath'): #texturl gesetzt und textViewer konfiguriert viewMode="text_dict" else: viewMode="images" @@ -267,8 +266,8 @@ ret="" if mk is None: return "" - if type(mk) is not ListType: - mk=[mk] + if type(mk) is not ListType: + mk=[mk] for m in mk: ret+="mk=%s"%m return ret