--- documentViewer/documentViewer.py 2010/11/23 16:36:50 1.158 +++ documentViewer/documentViewer.py 2010/11/25 09:03:50 1.159 @@ -283,7 +283,7 @@ class documentViewer(Folder): pt = getattr(self.template, 'thumbs_main_rss') 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.get('textURLPath',None): #texturl gesetzt und textViewer konfiguriert viewMode="text" else: viewMode="images" @@ -319,7 +319,7 @@ class documentViewer(Folder): 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.get('textURLPath',None): #texturl gesetzt und textViewer konfiguriert viewMode="text_dict" else: viewMode="images" @@ -796,7 +796,11 @@ class documentViewer(Folder): else: logging.error("documentViewer (getdocinfo) unknown mode: %s!"%mode) raise ValueError("Unknown mode %s! Has to be one of 'texttool','imagepath','filepath'."%(mode)) - + + # FIXME: fake texturlpath + if not docinfo.has_key('textURLPath'): + docinfo['textURLPath'] = None + logging.debug("documentViewer (getdocinfo) docinfo: %s"%docinfo) #logging.debug("documentViewer (getdocinfo) docinfo: %s"%) self.REQUEST.SESSION['docinfo'] = docinfo