# HG changeset patch # User casties # Date 1351508250 -3600 # Node ID 0806cb9061c17c5b63387d20f1893cef07e576a2 # Parent fc861a6cef1707bd5167c80ea09152ad76c004b1 fixed another bug when url starts with /mpiwg/online/ diff -r fc861a6cef17 -r 0806cb9061c1 documentViewer.py --- a/documentViewer.py Fri Oct 26 12:53:43 2012 +0200 +++ b/documentViewer.py Mon Oct 29 11:57:30 2012 +0100 @@ -554,9 +554,12 @@ if mode=="texttool": # url points to document dir or index.meta metaDom = self.metadataService.getDomFromPathOrUrl(url) - docUrl = url.replace('/index.meta', '') if metaDom is None: raise IOError("Unable to find index.meta for mode=texttool!") + + docUrl = url.replace('/index.meta', '') + if url.startswith('/mpiwg/online/'): + docUrl = url.replace('/mpiwg/online/', '', 1) elif mode=="imagepath": # url points to folder with images, index.meta optional @@ -648,6 +651,7 @@ # number of images from digilib if docinfo.get('imagePath', None): imgpath = docinfo['imagePath'].replace('/mpiwg/online/', '', 1) + logging.debug("imgpath=%s"%imgpath) docinfo['imageURL'] = "%s?fn=%s"%(self.digilibScalerUrl, imgpath) docinfo = self.getDocinfoFromDigilib(docinfo, imgpath) else: diff -r fc861a6cef17 -r 0806cb9061c1 version.txt --- a/version.txt Fri Oct 26 12:53:43 2012 +0200 +++ b/version.txt Mon Oct 29 11:57:30 2012 +0100 @@ -1,1 +1,1 @@ -DocumentViewer 2.2.6 \ No newline at end of file +DocumentViewer 2.2.7 \ No newline at end of file